diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-01-22 21:14:41 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-01-22 21:14:41 +0000 |
commit | aa5d08d04bcb05a6fb34e22aa47d73d0f2641b8f (patch) | |
tree | 3dae8b8ef548be7e37b4ed73d0c7968bbea42de1 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 351164504a563b896f68a61e41cf154964939d85 (diff) | |
download | bcm5719-llvm-aa5d08d04bcb05a6fb34e22aa47d73d0f2641b8f.tar.gz bcm5719-llvm-aa5d08d04bcb05a6fb34e22aa47d73d0f2641b8f.zip |
Module debugging: Create a parent DIModule with the PCH name for types
emitted into a precompiled header to mirror the debug info emitted for
object files importing the PCH.
rdar://problem/24290667
llvm-svn: 258555
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index efacc35d149..675b5eb07c5 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2224,8 +2224,12 @@ llvm::DIModule *CGDebugInfo::getParentModuleOrNull(const Decl *D) { // option. FullSourceLoc Loc(D->getLocation(), CGM.getContext().getSourceManager()); if (Module *M = ClangModuleMap->inferModuleFromLocation(Loc)) { + // This is a (sub-)module. auto Info = ExternalASTSource::ASTSourceDescriptor(*M); return getOrCreateModuleRef(Info, /*SkeletonCU=*/false); + } else { + // This the precompiled header being built. + return getOrCreateModuleRef(PCHDescriptor, /*SkeletonCU=*/false); } } |