summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-28 20:55:16 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-28 20:55:16 +0000
commitb6aca01fc2e1758ec296f8a53867173ce33f00df (patch)
treecec3f05b39fc4aaecb1d9548547f4405f128d1eb
parent964f4c6147242286303385cc6b5f5aab9334d7a8 (diff)
downloadbcm5719-llvm-b6aca01fc2e1758ec296f8a53867173ce33f00df.tar.gz
bcm5719-llvm-b6aca01fc2e1758ec296f8a53867173ce33f00df.zip
Fix Clang attribute reader tblgen output for a corresponding fix on the Clang side
llvm-svn: 136390
-rw-r--r--llvm/utils/TableGen/CMakeLists.txt3
-rw-r--r--llvm/utils/TableGen/ClangAttrEmitter.cpp8
2 files changed, 7 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/CMakeLists.txt b/llvm/utils/TableGen/CMakeLists.txt
index 4d71259a831..047d731de6b 100644
--- a/llvm/utils/TableGen/CMakeLists.txt
+++ b/llvm/utils/TableGen/CMakeLists.txt
@@ -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)
diff --git a/llvm/utils/TableGen/ClangAttrEmitter.cpp b/llvm/utils/TableGen/ClangAttrEmitter.cpp
index 26bd8786a49..9ad0603bdbf 100644
--- a/llvm/utils/TableGen/ClangAttrEmitter.cpp
+++ b/llvm/utils/TableGen/ClangAttrEmitter.cpp
@@ -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++]");
}
OpenPOWER on IntegriCloud