diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-08-19 02:30:28 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-08-19 02:30:28 +0000 |
commit | c52efa7d4011a48ea91b353f2cbc40a359d19571 (patch) | |
tree | edd1bd081f23d3ebd966becab206533d8198cbca /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 72be1c1b64f912246dcada007f0dddf8a29be584 (diff) | |
download | bcm5719-llvm-c52efa7d4011a48ea91b353f2cbc40a359d19571.tar.gz bcm5719-llvm-c52efa7d4011a48ea91b353f2cbc40a359d19571.zip |
[modules] Don't eagerly deserialize so many ImportDecls. CodeGen basically ignores ImportDecls imported from modules, so only eagerly deserialize the ones from a PCH / preamble.
llvm-svn: 245406
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 76e6f3dcde4..6352646f19c 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3363,11 +3363,8 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { auto *Import = cast<ImportDecl>(D); // Ignore import declarations that come from imported modules. - if (clang::Module *Owner = Import->getImportedOwningModule()) { - if (getLangOpts().CurrentModule.empty() || - Owner->getTopLevelModule()->Name == getLangOpts().CurrentModule) - break; - } + if (Import->getImportedOwningModule()) + break; if (CGDebugInfo *DI = getModuleDebugInfo()) DI->EmitImportDecl(*Import); |