[cfe-commits] r58973 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Chris Lattner
sabre at nondot.org
Sun Nov 9 22:10:01 PST 2008
Author: lattner
Date: Mon Nov 10 00:10:01 2008
New Revision: 58973
URL: http://llvm.org/viewvc/llvm-project?rev=58973&view=rev
Log:
Fix even more bugs in debug info support:
1. emit proper debug info for forward decls of structs.
2. emit DW_TAG_member nodes around members of a field like llvm-gcc does.
This slows down debug info generation, but is required for correctness.
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=58973&r1=58972&r2=58973&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Nov 10 00:10:01 2008
@@ -192,9 +192,6 @@
llvm::DICompileUnit Unit) {
const RecordDecl *Decl = Ty->getDecl();
- if (!Decl->getDefinition(M->getContext()))
- return llvm::DIType();
-
unsigned Tag;
if (Decl->isStruct())
Tag = llvm::dwarf::DW_TAG_structure_type;
@@ -244,7 +241,6 @@
FieldDecl *Field = *I;
llvm::DIType FieldTy = getOrCreateType(Field->getType(), Unit);
-#if 0
const char *FieldName = Field->getName();
if (FieldName == 0) FieldName = "";
@@ -265,7 +261,6 @@
FieldName, FieldDefUnit,
FieldLine, FieldSize, FieldAlign,
FieldOffset, 0, FieldTy);
-#endif
EltTys.push_back(FieldTy);
}
More information about the cfe-commits
mailing list