]> granicus.if.org Git - clang/commitdiff
Emit super class debug info.
authorDevang Patel <dpatel@apple.com>
Tue, 10 Mar 2009 21:30:26 +0000 (21:30 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 10 Mar 2009 21:30:26 +0000 (21:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66580 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index dcf34bbd2e989d6613f3dc3d27b40a8e2f712f0e..9b56b8449fad0c4bc535e1b4643205d0b45e31b0 100644 (file)
@@ -328,6 +328,17 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
   // Convert all the elements.
   llvm::SmallVector<llvm::DIDescriptor, 16> EltTys;
 
+  ObjCInterfaceDecl *SClass = Decl->getSuperClass();
+  if (SClass) {
+    llvm::DIType SClassTy = 
+      getOrCreateType(M->getContext().getObjCInterfaceType(SClass), Unit);
+    llvm::DIType InhTag = 
+      DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_inheritance,
+                                     Unit, "", Unit, 0, 0, 0,
+                                     0 /* offset */, 0, SClassTy);
+    EltTys.push_back(InhTag);
+  }
+
   const ASTRecordLayout &RL = M->getContext().getASTObjCInterfaceLayout(Decl);
 
   unsigned FieldNo = 0;