summaryrefslogtreecommitdiffstats
path: root/clang/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
commitc8b0c9d8fde1671128981bb75a8c6bc112800da2 (patch)
tree532bf5fa017a8a5d5df8e8aeca10b750aafbd83b /clang/lib/CodeGen/CGDebugInfo.cpp
parent6e55cd5e29130670545b448fe6ac485ac6a11153 (diff)
downloadbcm5719-llvm-c8b0c9d8fde1671128981bb75a8c6bc112800da2.tar.gz
bcm5719-llvm-c8b0c9d8fde1671128981bb75a8c6bc112800da2.zip
When generating debug info for an ObjCInterfaceDecl, try to dig out the definition.
llvm-svn: 146705
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 2b67c2e5e43..fa057e2e4be 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud