clang/Modules: Rename CompilerInstance::ModuleManager, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 22 Nov 2019 02:25:03 +0000 (18:25 -0800)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 23 Nov 2019 02:24:11 +0000 (18:24 -0800)
commit20d51b2f14ac4488f684f8fc57cb0ba718a6b91d
tree3e33ed48c78a2f748ee513428c1cf86d62650c56
parent5cca622310c10fdf6f921b6cce26f91d9f14c762
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
clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp
clang/include/clang/Frontend/CompilerInstance.h
clang/lib/Frontend/ASTUnit.cpp
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Frontend/FrontendAction.cpp
clang/lib/Frontend/Rewrite/FrontendActions.cpp
clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp