summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-10-01 00:48:51 +0000
committerAdrian Prantl <aprantl@apple.com>2015-10-01 00:48:51 +0000
commitfd69611c8e900e32d427e861f0365f594b55dc7c (patch)
treecac612849ea42ae623e64d9fecf156b876a12956 /clang/lib/CodeGen/CGDebugInfo.cpp
parentf997bd88d76241309d76b6f6ee24cf8379d50777 (diff)
downloadbcm5719-llvm-fd69611c8e900e32d427e861f0365f594b55dc7c.tar.gz
bcm5719-llvm-fd69611c8e900e32d427e861f0365f594b55dc7c.zip
Module debugging: Emit Objective-C interfaces in their module scope when
building a clang module. llvm-svn: 248974
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 443c45cc64a..d5ed7ea1d64 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1743,9 +1743,10 @@ llvm::DIType *CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty,
if (ID->getImplementation())
Flags |= llvm::DINode::FlagObjcClassComplete;
+ llvm::DIScope *Mod = getParentModuleOrNull(ID);
llvm::DICompositeType *RealDecl = DBuilder.createStructType(
- Unit, ID->getName(), DefUnit, Line, Size, Align, Flags, nullptr,
- llvm::DINodeArray(), RuntimeLang);
+ Mod ? Mod : Unit, ID->getName(), DefUnit, Line, Size, Align, Flags,
+ nullptr, llvm::DINodeArray(), RuntimeLang);
QualType QTy(Ty, 0);
TypeCache[QTy.getAsOpaquePtr()].reset(RealDecl);
OpenPOWER on IntegriCloud