summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-01-16 14:55:42 +0000
committerHans Wennborg <hans@hanshq.net>2018-01-16 14:55:42 +0000
commitaf83b0c09a2b15bd10a08ac7ae431f1297ce90ea (patch)
treebc3d57d074161c00a294ff71d4c5d9e4e32030db /lib
parent3809ab9a2ef9816f5d42b434df65207fe04a0e44 (diff)
Merging r321754:
------------------------------------------------------------------------ r321754 | adrian | 2018-01-03 11:10:21 -0800 (Wed, 03 Jan 2018) | 9 lines -gmodules: Emit debug info for implicit module imports via #include. When a type is only used as a template parameter and that type is the only type imported from another #include'd module, no skeleton CU for that module is generated, so a consumer doesn't know where to find the type definition. By emitting an import declaration, we can force a skeleton CU to be generated for each imported module. rdar://problem/36266156 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_60@322557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/ObjectFilePCHContainerOperations.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
index d0760b9cc2..0fe9f5da07 100644
--- a/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
+++ b/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
@@ -229,6 +229,11 @@ public:
Builder->getModuleDebugInfo()->completeRequiredType(RD);
}
+ void HandleImplicitImportDecl(ImportDecl *D) override {
+ if (!D->getImportedOwningModule())
+ Builder->getModuleDebugInfo()->EmitImportDecl(*D);
+ }
+
/// Emit a container holding the serialized AST.
void HandleTranslationUnit(ASTContext &Ctx) override {
assert(M && VMContext && Builder);