[cfe-commits] r146705 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Douglas Gregor
dgregor at apple.com
Thu Dec 15 15:32:29 PST 2011
Author: dgregor
Date: Thu Dec 15 17:32:29 2011
New Revision: 146705
URL: http://llvm.org/viewvc/llvm-project?rev=146705&view=rev
Log:
When generating debug info for an ObjCInterfaceDecl, try to dig out the definition.
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=146705&r1=146704&r2=146705&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Dec 15 17:32:29 2011
@@ -1211,7 +1211,8 @@
// If this is just a forward declaration return a special forward-declaration
// debug type since we won't be able to lay out the entire type.
- if (!ID->isThisDeclarationADefinition()) {
+ ObjCInterfaceDecl *Def = ID->getDefinition();
+ if (!Def) {
llvm::DIType FwdDecl =
DBuilder.createStructType(Unit, ID->getName(),
DefUnit, Line, 0, 0,
@@ -1219,6 +1220,7 @@
llvm::DIArray(), RuntimeLang);
return FwdDecl;
}
+ ID = Def;
// To handle a recursive interface, we first generate a debug descriptor
// for the struct as a forward declaration. Then (if it is a definition)
More information about the cfe-commits
mailing list