1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

Add serialization for Expr* arguments for attributes to clang tablegen files.

Patch thanks to Zach Anderson.

llvm-svn: 125721
This commit is contained in:
Alexis Hunt 2011-02-17 03:30:09 +00:00
parent 6e936c247f
commit be0782975d

View File

@ -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");
}