diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
commit | 486754660bb926339aefcf012a3f848592babb8b (patch) | |
tree | ecdbc446c9876f4f120f701c243373cd3cb43db3 /lib/CodeGen/ObjectFilePCHContainerOperations.cpp | |
parent | 55e6d896ad333f07bb3b1ba487df214fc268a4ab (diff) |
Notes
Diffstat (limited to 'lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
-rw-r--r-- | lib/CodeGen/ObjectFilePCHContainerOperations.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/lib/CodeGen/ObjectFilePCHContainerOperations.cpp index d0760b9cc2a60..c164cec5d9424 100644 --- a/lib/CodeGen/ObjectFilePCHContainerOperations.cpp +++ b/lib/CodeGen/ObjectFilePCHContainerOperations.cpp @@ -71,9 +71,8 @@ class PCHContainerGenerator : public ASTConsumer { } bool VisitImportDecl(ImportDecl *D) { - auto *Import = cast<ImportDecl>(D); - if (!Import->getImportedOwningModule()) - DI.EmitImportDecl(*Import); + if (!D->getImportedOwningModule()) + DI.EmitImportDecl(*D); return true; } @@ -229,6 +228,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); @@ -286,7 +290,7 @@ public: else ASTSym->setSection("__clangast"); - DEBUG({ + LLVM_DEBUG({ // Print the IR for the PCH container to the debug output. llvm::SmallString<0> Buffer; clang::EmitBackendOutput( |