aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/ClangAttrEmitter.cpp
diff options
context:
space:
mode:
authorSean Hunt <scshunt@csclub.uwaterloo.ca>2011-02-17 03:30:09 +0000
committerSean Hunt <scshunt@csclub.uwaterloo.ca>2011-02-17 03:30:09 +0000
commitc85094f9091eb4109563679ba97f7ea96ce7d75d (patch)
tree16077dac769ffad9e3ad5aac75dc16cb2e002373 /utils/TableGen/ClangAttrEmitter.cpp
parent41429e3f1e4d72ee4f7d4df786b5b0c87405f5b0 (diff)
Add serialization for Expr* arguments for attributes to clang tablegen files.
Patch thanks to Zach Anderson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/ClangAttrEmitter.cpp')
-rw-r--r--utils/TableGen/ClangAttrEmitter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp
index f33cb50c76..27e1e027d0 100644
--- a/utils/TableGen/ClangAttrEmitter.cpp
+++ b/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");
}