[cfe-commits] r67766 - in /cfe/trunk/lib: CodeGen/CGObjCMac.cpp Lex/Preprocessor.cpp

Fariborz Jahanian fjahanian at apple.com
Thu Mar 26 12:10:36 PDT 2009


Author: fjahanian
Date: Thu Mar 26 14:10:36 2009
New Revision: 67766

URL: http://llvm.org/viewvc/llvm-project?rev=67766&view=rev
Log:
- Minor change to dump of ivar layout map.
- Temporarily undef'ed __OBJC2__ in nonfragile objc abi mode
  as it was forcing ivar synthesis in a certain project which clang
  does not yet support.

Modified:
    cfe/trunk/lib/CodeGen/CGObjCMac.cpp
    cfe/trunk/lib/Lex/Preprocessor.cpp

Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=67766&r1=67765&r2=67766&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Thu Mar 26 14:10:36 2009
@@ -2918,7 +2918,10 @@
     printf("\nweak ivar layout: ");
   const unsigned char *s = (unsigned char*)BitMap.c_str();
   for (unsigned i = 0; i < BitMap.size(); i++)
-    printf("0x%x ", s[i]);
+    if (!(s[i] & 0xf0))
+      printf("0x0%x%s", s[i], s[i] != 0 ? ", " : "");
+    else
+      printf("0x%x%s",  s[i], s[i] != 0 ? ", " : "");
   printf("\n");
   
   return getConstantGEP(Entry, 0, 0);

Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=67766&r1=67765&r2=67766&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Thu Mar 26 14:10:36 2009
@@ -497,8 +497,12 @@
   
   if (PP.getLangOptions().ObjC1) {
     DefineBuiltinMacro(Buf, "__OBJC__=1");
+#if 0
+// FIXME. This flag controls declaration of ivars which is
+// needed since we do not support synthesize ivars yet.
     if (PP.getLangOptions().ObjCNonFragileABI)
       DefineBuiltinMacro(Buf, "__OBJC2__=1");
+#endif
 
     if (PP.getLangOptions().getGCMode() == LangOptions::NonGC) {
       DefineBuiltinMacro(Buf, "__weak=");





More information about the cfe-commits mailing list