diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-11-21 18:25:03 -0800 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-11-22 18:24:11 -0800 |
commit | 20d51b2f14ac4488f684f8fc57cb0ba718a6b91d (patch) | |
tree | 3e33ed48c78a2f748ee513428c1cf86d62650c56 /clang/lib/Frontend/FrontendAction.cpp | |
parent | 5cca622310c10fdf6f921b6cce26f91d9f14c762 (diff) | |
download | bcm5719-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/Frontend/FrontendAction.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendAction.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index 866eca52b3f..934d17b3c92 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -871,9 +871,9 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, // extended by an external source. if (CI.getLangOpts().Modules || !CI.hasASTContext() || !CI.getASTContext().getExternalSource()) { - CI.createModuleManager(); - CI.getModuleManager()->setDeserializationListener(DeserialListener, - DeleteDeserialListener); + CI.createASTReader(); + CI.getASTReader()->setDeserializationListener(DeserialListener, + DeleteDeserialListener); } } @@ -892,7 +892,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, } else { // FIXME: If this is a problem, recover from it by creating a multiplex // source. - assert((!CI.getLangOpts().Modules || CI.getModuleManager()) && + assert((!CI.getLangOpts().Modules || CI.getASTReader()) && "modules enabled but created an external source that " "doesn't support modules"); } |