summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2019-11-21 18:25:03 -0800
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2019-11-22 18:24:11 -0800
commit20d51b2f14ac4488f684f8fc57cb0ba718a6b91d (patch)
tree3e33ed48c78a2f748ee513428c1cf86d62650c56 /clang/lib/Tooling
parent5cca622310c10fdf6f921b6cce26f91d9f14c762 (diff)
downloadbcm5719-llvm-20d51b2f14ac4488f684f8fc57cb0ba718a6b91d.tar.gz
bcm5719-llvm-20d51b2f14ac4488f684f8fc57cb0ba718a6b91d.zip
clang/Modules: Rename CompilerInstance::ModuleManager, NFC
Fix the confusing naming of `CompilerInstance::ModuleManager`. This is actually an instance of `ASTReader`, which contains an instance of `ModuleManager`. I have to assume there was a point in the past where they were just one class, but it's been pretty confusing for a while. I think it's time to fix it. The new name is `TheASTReader`; the annoying `The` prefix is so that we don't shadow the `ASTReader` class. I tried out `ASTRdr` but that seemed less clear, and this choice matches `ThePCHContainerOperations` just a couple of declarations below. Also rename `CompilerInstance::getModuleManager` and `CompilerInstance::createModuleManager` to `*ASTReader`, making some cases of `getModuleManager().getModuleManager()` a little more clear. https://reviews.llvm.org/D70583
Diffstat (limited to 'clang/lib/Tooling')
-rw-r--r--clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp b/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
index 7f20ec7056c..422940047f2 100644
--- a/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
+++ b/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
@@ -97,9 +97,8 @@ void ModuleDepCollectorPP::handleTopLevelModule(const Module *M) {
MD.ModulePCMPath = M->getASTFile()->getName();
MD.ContextHash = MDC.ContextHash;
serialization::ModuleFile *MF =
- MDC.Instance.getModuleManager()->getModuleManager().lookup(
- M->getASTFile());
- MDC.Instance.getModuleManager()->visitInputFiles(
+ MDC.Instance.getASTReader()->getModuleManager().lookup(M->getASTFile());
+ MDC.Instance.getASTReader()->visitInputFiles(
*MF, true, true, [&](const serialization::InputFile &IF, bool isSystem) {
MD.FileDeps.insert(IF.getFile()->getName());
});
OpenPOWER on IntegriCloud