From 85d938aadbea1ba16d893b49f94620bd6d706f98 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Mon, 21 Sep 2015 17:48:37 +0000 Subject: Debug Info: When building a module, emit skeleton CUs for imported modules. llvm-svn: 248184 --- clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp') 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(D); + if (!Import->getImportedOwningModule()) + DI.EmitImportDecl(*Import); + return true; + } + bool VisitTypeDecl(TypeDecl *D) { QualType QualTy = Ctx.getTypeDeclType(D); if (!QualTy.isNull() && CanRepresent(QualTy.getTypePtr())) -- cgit v1.2.3