Do not generate bogus location info for DW_TAG_inheritance
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
llvm-svn: 70966
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 9715337..a720cbc 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -413,7 +413,7 @@
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);
}