[llvm-commits] [llvm] r136390 - in /llvm/trunk/utils/TableGen: CMakeLists.txt ClangAttrEmitter.cpp

Douglas Gregor dgregor at apple.com
Thu Jul 28 13:55:16 PDT 2011


Author: dgregor
Date: Thu Jul 28 15:55:16 2011
New Revision: 136390

URL: http://llvm.org/viewvc/llvm-project?rev=136390&view=rev
Log:
Fix Clang attribute reader tblgen output for a corresponding fix on the Clang side

Modified:
    llvm/trunk/utils/TableGen/CMakeLists.txt
    llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp

Modified: llvm/trunk/utils/TableGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CMakeLists.txt?rev=136390&r1=136389&r2=136390&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CMakeLists.txt (original)
+++ llvm/trunk/utils/TableGen/CMakeLists.txt Thu Jul 28 15:55:16 2011
@@ -52,6 +52,9 @@
 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)

Modified: llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=136390&r1=136389&r2=136390&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp Thu Jul 28 15:55:16 2011
@@ -42,11 +42,11 @@
 
 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++]");
 }
 





More information about the llvm-commits mailing list