]> granicus.if.org Git - clang/commitdiff
Emit base classes info first, as expected by the debugger.
authorDevang Patel <dpatel@apple.com>
Thu, 28 Jan 2010 21:41:35 +0000 (21:41 +0000)
committerDevang Patel <dpatel@apple.com>
Thu, 28 Jan 2010 21:41:35 +0000 (21:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94755 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index 7d2b4cd75030696f09ae5a87dde8255da619322e..4a4b1a91798fdb48546aa2f076e73c8835c6a2a2 100644 (file)
@@ -525,7 +525,6 @@ llvm::DIType
 CGDebugInfo::getOrCreateMethodType(const CXXMethodDecl *Method,
                                    llvm::DICompileUnit Unit) {
   llvm::DIType FnTy = getOrCreateType(Method->getType(), Unit);
-
   // Add "this" pointer.
 
   llvm::DIArray Args = llvm::DICompositeType(FnTy.getNode()).getTypeArray();
@@ -804,13 +803,14 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty,
   llvm::SmallVector<llvm::DIDescriptor, 16> EltTys;
 
   const CXXRecordDecl *CXXDecl = dyn_cast<CXXRecordDecl>(Decl);
-  if (CXXDecl) 
+  if (CXXDecl) {
+    CollectCXXBases(CXXDecl, Unit, EltTys, FwdDecl);
     CollectVtableInfo(CXXDecl, Unit, EltTys);
+  }
   CollectRecordFields(Decl, Unit, EltTys);
   llvm::MDNode *ContainingType = NULL;
   if (CXXDecl) {
     CollectCXXMemberFunctions(CXXDecl, Unit, EltTys, FwdDecl);
-    CollectCXXBases(CXXDecl, Unit, EltTys, FwdDecl);
 
     // A class's primary base or the class itself contains the vtable.
     const ASTRecordLayout &RL = CGM.getContext().getASTRecordLayout(Decl);