diff options
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())) |