aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-12-15 23:32:29 +0000
committerDouglas Gregor <dgregor@apple.com>2011-12-15 23:32:29 +0000
commit7c1f1f158205efd07ab169772079ab527aed34dc (patch)
treed52ded39dd44d5d2e62c2610d19072b0a7194495 /lib/CodeGen/CGDebugInfo.cpp
parent05c272fed899b8d3142cf080e86a235fc6168862 (diff)
When generating debug info for an ObjCInterfaceDecl, try to dig out the definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 2b67c2e5e4..fa057e2e4b 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -1211,7 +1211,8 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
// 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::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
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)