projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41429e3
)
Add serialization for Expr* arguments for attributes to clang tablegen files.
author
Sean Hunt
<scshunt@csclub.uwaterloo.ca>
Thu, 17 Feb 2011 03:30:09 +0000
(
03:30
+0000)
committer
Sean Hunt
<scshunt@csclub.uwaterloo.ca>
Thu, 17 Feb 2011 03:30:09 +0000
(
03:30
+0000)
Patch thanks to Zach Anderson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125721
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/TableGen/ClangAttrEmitter.cpp
patch
|
blob
|
history
diff --git
a/utils/TableGen/ClangAttrEmitter.cpp
b/utils/TableGen/ClangAttrEmitter.cpp
index f33cb50c760ac4a65deafe08a5a347e76d6254bb..27e1e027d0fa2bae53f76af0e8d8fc3bae3a4276 100644
(file)
--- 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");
}