diff options
author | Adrian Prantl <aprantl@apple.com> | 2015-10-01 16:57:02 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2015-10-01 16:57:02 +0000 |
commit | 42ce2d3ba335fe1a3213f3538f22fc73e7ec4621 (patch) | |
tree | 6c63226a685cf30412f29e9b5e328eaedb80f137 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 447e35701ac3dc05474c1f74bf121faf2abd652a (diff) | |
download | bcm5719-llvm-42ce2d3ba335fe1a3213f3538f22fc73e7ec4621.tar.gz bcm5719-llvm-42ce2d3ba335fe1a3213f3538f22fc73e7ec4621.zip |
Module debugging: Also emit Objective-C interfaces forward declarations
in their module scope when building a clang module.
llvm-svn: 249031
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index d5ed7ea1d64..b8c66eccba6 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1663,9 +1663,10 @@ llvm::DIType *CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, // debug type since we won't be able to lay out the entire type. ObjCInterfaceDecl *Def = ID->getDefinition(); if (!Def || !Def->getImplementation()) { + llvm::DIScope *Mod = getParentModuleOrNull(ID); llvm::DIType *FwdDecl = DBuilder.createReplaceableCompositeType( - llvm::dwarf::DW_TAG_structure_type, ID->getName(), TheCU, DefUnit, Line, - RuntimeLang); + llvm::dwarf::DW_TAG_structure_type, ID->getName(), Mod ? Mod : TheCU, + DefUnit, Line, RuntimeLang); ObjCInterfaceCache.push_back(ObjCInterfaceCacheEntry(Ty, FwdDecl, Unit)); return FwdDecl; } |