Fix Clang attribute reader tblgen output for a corresponding fix on the Clang side
authorDouglas Gregor <dgregor@apple.com>
Thu, 28 Jul 2011 20:55:16 +0000 (20:55 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 28 Jul 2011 20:55:16 +0000 (20:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136390 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CMakeLists.txt
utils/TableGen/ClangAttrEmitter.cpp

index 4d71259a8315b09cc5476b028fa9f0de900c7b35..047d731de6b991ea2d765ded3bfb4dbfee36316b 100644 (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)
index 26bd8786a49cedfff9b634420b10acd891a2f754..9ad0603bdbfbe8390b6aa6797fb251468f633b2a 100644 (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++]");
 }