diff options
author | Adrian Prantl <aprantl@apple.com> | 2015-09-21 17:48:37 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2015-09-21 17:48:37 +0000 |
commit | 85d938aadbea1ba16d893b49f94620bd6d706f98 (patch) | |
tree | d8f10a161f19f0a01a6b1fb104aa1f7ab83eb8f9 /clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp | |
parent | 53d5cea648d8db7ceeedced4309e8ddd2c715578 (diff) | |
download | bcm5719-llvm-85d938aadbea1ba16d893b49f94620bd6d706f98.tar.gz bcm5719-llvm-85d938aadbea1ba16d893b49f94620bd6d706f98.zip |
Debug Info: When building a module, emit skeleton CUs for imported modules.
llvm-svn: 248184
Diffstat (limited to 'clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
-rw-r--r-- | clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp index 1673340a495..310e374e348 100644 --- a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp +++ b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp @@ -67,6 +67,13 @@ class PCHContainerGenerator : public ASTConsumer { return !Ty->isDependentType() && !Ty->isUndeducedType(); } + bool VisitImportDecl(ImportDecl *D) { + auto *Import = cast<ImportDecl>(D); + if (!Import->getImportedOwningModule()) + DI.EmitImportDecl(*Import); + return true; + } + bool VisitTypeDecl(TypeDecl *D) { QualType QualTy = Ctx.getTypeDeclType(D); if (!QualTy.isNull() && CanRepresent(QualTy.getTypePtr())) |