]> granicus.if.org Git - clang/commitdiff
- Minor change to dump of ivar layout map.
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 26 Mar 2009 19:10:36 +0000 (19:10 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 26 Mar 2009 19:10:36 +0000 (19:10 +0000)
- 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67766 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCMac.cpp
lib/Lex/Preprocessor.cpp

index f8393742429fea3576751b605a54988bd306e2b2..c15c3bb1e7df9fad7945fbfe86e6e4dd76ff7c69 100644 (file)
@@ -2918,7 +2918,10 @@ llvm::Constant *CGObjCCommonMac::BuildIvarLayout(
     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);
index a43bb6427e90504302dc5ae0f9d3acd6384e2039..a37b28b2b1df94d6d2c08308f207f1b08e8efcae 100644 (file)
@@ -497,8 +497,12 @@ static void InitializePredefinedMacros(Preprocessor &PP,
   
   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=");