[llvm-commits] [llvm] r125721 - /llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp

Sean Hunt scshunt at csclub.uwaterloo.ca
Wed Feb 16 19:30:09 PST 2011


Author: coppro
Date: Wed Feb 16 21:30:09 2011
New Revision: 125721

URL: http://llvm.org/viewvc/llvm-project?rev=125721&view=rev
Log:
Add serialization for Expr* arguments for attributes to clang tablegen files.

Patch thanks to Zach Anderson.

Modified:
    llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp

Modified: llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=125721&r1=125720&r2=125721&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp Wed Feb 16 21:30:09 2011
@@ -45,6 +45,7 @@
     .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 @@
     .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");
 }
 





More information about the llvm-commits mailing list