[cfe-commits] r162145 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Eric Christopher echristo at apple.com
Fri Aug 17 15:54:57 PDT 2012


Author: echristo
Date: Fri Aug 17 17:54:57 2012
New Revision: 162145

URL: http://llvm.org/viewvc/llvm-project?rev=162145&view=rev
Log:
Reapply:

Make isa part of objc_object at metadata generation time.

Noticed on inspection.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=162145&r1=162144&r2=162145&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri Aug 17 17:54:57 2012
@@ -368,17 +368,19 @@
     
     llvm::DIType ISATy = DBuilder.createPointerType(OCTy, Size);
 
-    SmallVector<llvm::Value *, 16> EltTys;
+    llvm::MDNode *ObjTy = DBuilder.createStructType(TheCU, "objc_object", 
+                                                    getOrCreateMainFile(),
+                                                    0, 0, 0, 0, llvm::DIArray());
+    SmallVector<llvm::Value *, 1> EltTys;
     llvm::DIType FieldTy = 
-      DBuilder.createMemberType(getOrCreateMainFile(), "isa",
+      DBuilder.createMemberType(llvm::DIDescriptor(ObjTy), "isa",
                                 getOrCreateMainFile(), 0, Size,
                                 0, 0, 0, ISATy);
     EltTys.push_back(FieldTy);
     llvm::DIArray Elements = DBuilder.getOrCreateArray(EltTys);
-    
-    return DBuilder.createStructType(TheCU, "objc_object", 
-                                     getOrCreateMainFile(),
-                                     0, 0, 0, 0, Elements);
+
+    ObjTy->replaceOperandWith(10, Elements);
+    return llvm::DIType(ObjTy);
   }
   case BuiltinType::ObjCSel: {
     return





More information about the cfe-commits mailing list