diff options
author | Alexis Hunt <alercah@gmail.com> | 2011-02-17 03:30:09 +0000 |
---|---|---|
committer | Alexis Hunt <alercah@gmail.com> | 2011-02-17 03:30:09 +0000 |
commit | e2d77b8142144a8156f0f8c73ef86c96b3efaa1a (patch) | |
tree | 5cb2c270307cbfb2af29f660bd551ecc6ca4fe29 | |
parent | 0e5d72f16483e9032acc66049e5f4a57499717be (diff) | |
download | bcm5719-llvm-e2d77b8142144a8156f0f8c73ef86c96b3efaa1a.tar.gz bcm5719-llvm-e2d77b8142144a8156f0f8c73ef86c96b3efaa1a.zip |
Add serialization for Expr* arguments for attributes to clang tablegen files.
Patch thanks to Zach Anderson.
llvm-svn: 125721
-rw-r--r-- | llvm/utils/TableGen/ClangAttrEmitter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/ClangAttrEmitter.cpp b/llvm/utils/TableGen/ClangAttrEmitter.cpp index f33cb50c760..27e1e027d0f 100644 --- a/llvm/utils/TableGen/ClangAttrEmitter.cpp +++ b/llvm/utils/TableGen/ClangAttrEmitter.cpp @@ -45,6 +45,7 @@ std::string ReadPCHRecord(StringRef type) { .EndsWith("Decl *", "cast_or_null<" + std::string(type, 0, type.size()-1) + ">(GetDecl(Record[Idx++]))") .Case("QualType", "GetType(Record[Idx++])") + .Case("Expr *", "ReadSubExpr()") .Default("Record[Idx++]"); } @@ -54,6 +55,7 @@ std::string WritePCHRecord(StringRef type, StringRef name) { .EndsWith("Decl *", "AddDeclRef(" + std::string(name) + ", Record);\n") .Case("QualType", "AddTypeRef(" + std::string(name) + ", Record);\n") + .Case("Expr *", "AddStmt(" + std::string(name) + ");\n") .Default("Record.push_back(" + std::string(name) + ");\n"); } |