From 3aa2146552fafac2b5ba24a42d28861d22fe3175 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 7 Sep 2010 20:16:43 +0000 Subject: [PATCH] Add function attributes to the output of -ast-print-xml, from Martin Vejnar! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113266 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Frontend/DeclXML.def | 4 ++++ include/clang/Frontend/TypeXML.def | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/include/clang/Frontend/DeclXML.def b/include/clang/Frontend/DeclXML.def index 18451189bc..29135e6293 100644 --- a/include/clang/Frontend/DeclXML.def +++ b/include/clang/Frontend/DeclXML.def @@ -103,6 +103,9 @@ NODE_XML(FunctionDecl, "Function") ATTRIBUTE_OPT_XML(isInlineSpecified(), "inline") //ATTRIBUTE_OPT_XML(isVariadic(), "variadic") // in the type reference ATTRIBUTE_XML(getNumParams(), "num_args") + ATTRIBUTE_OPT_XML(isMain(), "main") + ATTRIBUTE_OPT_XML(isExternC(), "externc") + ATTRIBUTE_OPT_XML(isGlobal(), "global") SUB_NODE_SEQUENCE_XML(ParmVarDecl) SUB_NODE_FN_BODY_XML END_NODE_XML @@ -117,6 +120,7 @@ NODE_XML(CXXMethodDecl, "CXXMethod") ATTRIBUTE_OPT_XML(isInlineSpecified(), "inline") ATTRIBUTE_OPT_XML(isStatic(), "static") ATTRIBUTE_OPT_XML(isVirtual(), "virtual") + ATTRIBUTE_OPT_XML(isPure(), "pure") ATTRIBUTE_ENUM_OPT_XML(getAccess(), "access") ENUM_XML(AS_none, "") ENUM_XML(AS_public, "public") diff --git a/include/clang/Frontend/TypeXML.def b/include/clang/Frontend/TypeXML.def index 1536c924a8..68452ae267 100644 --- a/include/clang/Frontend/TypeXML.def +++ b/include/clang/Frontend/TypeXML.def @@ -130,6 +130,13 @@ NODE_XML(FunctionProtoType, "FunctionType") ID_ATTRIBUTE_XML ATTRIBUTE_XML(getResultType(), "result_type") ATTRIBUTE_OPT_XML(isVariadic(), "variadic") + ATTRIBUTE_ENUM_XML(getCallConv(), "call_conv") + ENUM_XML(CC_Default, "") + ENUM_XML(CC_C, "C") + ENUM_XML(CC_X86StdCall, "X86StdCall") + ENUM_XML(CC_X86FastCall, "X86FastCall") + ENUM_XML(CC_X86ThisCall, "X86ThisCall") + END_ENUM_XML END_NODE_XML NODE_XML(TypedefType, "Typedef") -- 2.40.0