summaryrefslogtreecommitdiff
path: root/utils
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
commit6bd4842f89ef0f6a53b78664f9f3f2a1006117a9 (patch)
tree1a31d2601673022d27dec259b13a4879f8733f41 /utils
parentcc07e04262fe4bc35469fbadc53d2ec7bfd02fe2 (diff)
downloadllvm-6bd4842f89ef0f6a53b78664f9f3f2a1006117a9.tar.gz
llvm-6bd4842f89ef0f6a53b78664f9f3f2a1006117a9.tar.bz2
llvm-6bd4842f89ef0f6a53b78664f9f3f2a1006117a9.tar.xz
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
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/CMakeLists.txt3
-rw-r--r--utils/TableGen/ClangAttrEmitter.cpp8
2 files changed, 7 insertions, 4 deletions
diff --git a/utils/TableGen/CMakeLists.txt b/utils/TableGen/CMakeLists.txt
index 4d71259a83..047d731de6 100644
--- a/utils/TableGen/CMakeLists.txt
+++ b/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/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp
index 26bd8786a4..9ad0603bdb 100644
--- a/utils/TableGen/ClangAttrEmitter.cpp
+++ b/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++]");
}