diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-05-12 23:27:00 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-05-12 23:27:00 +0000 |
| commit | fc8c57cc5ba561e5d12794399d15aae35929b56d (patch) | |
| tree | 8b6066fb88bd29ca847706857a674163385a196d /clang/lib/AST/ASTDumper.cpp | |
| parent | 2a735421d1aace9d64c4ee7adc1f905974311db3 (diff) | |
| download | bcm5719-llvm-fc8c57cc5ba561e5d12794399d15aae35929b56d.tar.gz bcm5719-llvm-fc8c57cc5ba561e5d12794399d15aae35929b56d.zip | |
[modules] When creating a declaration, cache its owning module immediately
rather than waiting until it's queried.
Currently this is only applied to local submodule visibility mode, as we don't
yet allocate storage for the owning module in non-local-visibility modules
compilations.
llvm-svn: 302965
Diffstat (limited to 'clang/lib/AST/ASTDumper.cpp')
| -rw-r--r-- | clang/lib/AST/ASTDumper.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp index ef491ab06f8..d89be0d9e6f 100644 --- a/clang/lib/AST/ASTDumper.cpp +++ b/clang/lib/AST/ASTDumper.cpp @@ -1038,10 +1038,10 @@ void ASTDumper::dumpDecl(const Decl *D) { dumpSourceRange(D->getSourceRange()); OS << ' '; dumpLocation(D->getLocation()); - if (Module *M = D->getImportedOwningModule()) + if (D->isFromASTFile()) + OS << " imported"; + if (Module *M = D->getOwningModule()) OS << " in " << M->getFullModuleName(); - else if (Module *M = D->getLocalOwningModule()) - OS << " in (local) " << M->getFullModuleName(); if (auto *ND = dyn_cast<NamedDecl>(D)) for (Module *M : D->getASTContext().getModulesWithMergedDefinition( const_cast<NamedDecl *>(ND))) |

