Fix Clang attribute reader tblgen output for a corresponding fix on the Clang side

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136390 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Douglas Gregor 2011-07-28 20:55:16 +00:00
parent cc07e04262
commit 6bd4842f89
2 changed files with 7 additions and 4 deletions

View File

@ -52,6 +52,9 @@ add_llvm_utility(tblgen
target_link_libraries(tblgen LLVMSupport)
if( MINGW )
target_link_libraries(tblgen imagehlp psapi)
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
set_target_properties(tblgen PROPERTIES LINK_FLAGS -Wl,--stack,16777216)
endif(CMAKE_SIZEOF_VOID_P MATCHES "8")
endif( MINGW )
if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD AND NOT BEOS )
target_link_libraries(tblgen pthread)

View File

@ -42,11 +42,11 @@ getValueAsListOfStrings(Record &R, StringRef FieldName) {
std::string ReadPCHRecord(StringRef type) {
return StringSwitch<std::string>(type)
.EndsWith("Decl *", "cast_or_null<" + std::string(type, 0, type.size()-1) +
">(GetDecl(Record[Idx++]))")
.Case("QualType", "GetType(Record[Idx++])")
.EndsWith("Decl *", "GetLocalDeclAs<"
+ std::string(type, 0, type.size()-1) + ">(F, Record[Idx++])")
.Case("QualType", "getLocalType(F, Record[Idx++])")
.Case("Expr *", "ReadSubExpr()")
.Case("IdentifierInfo *", "GetIdentifierInfo(Record, Idx)")
.Case("IdentifierInfo *", "GetIdentifierInfo(F, Record, Idx)")
.Default("Record[Idx++]");
}