]> granicus.if.org Git - clang/commitdiff
Do not generate bogus location info for DW_TAG_inheritance
authorChris Lattner <sabre@nondot.org>
Tue, 5 May 2009 05:05:36 +0000 (05:05 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 5 May 2009 05:05:36 +0000 (05:05 +0000)
DIEs.  We were generating a loc with line of 0 and a file.
These tags do not need locations at all, just remove it.
this fixes rdar://6852792 - Clang generates incorrect (and unnecessary) file and line info for DW_TAG_inheritance dies

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

lib/CodeGen/CGDebugInfo.cpp

index 97153379709de22e2fdcd653e14eeee310eb67d0..a720cbc7a4f428b77e8ce2dd4423bf49230a48d4 100644 (file)
@@ -413,7 +413,7 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
       getOrCreateType(M->getContext().getObjCInterfaceType(SClass), Unit);
     llvm::DIType InhTag = 
       DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_inheritance,
-                                     Unit, "", Unit, 0, 0, 0,
+                                     Unit, "", llvm::DICompileUnit(), 0, 0, 0,
                                      0 /* offset */, 0, SClassTy);
     EltTys.push_back(InhTag);
   }