This is an archive of the discontinued LLVM Phabricator instance.

clang/Modules: Rename CompilerInstance::ModuleManager, NFC
ClosedPublic

Authored by dexonsmith on Nov 21 2019, 6:37 PM.

Details

Summary

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.

I built this on top of https://reviews.llvm.org/D70556 so I don't need to do an annoying rebase later.

Diff Detail

Event Timeline

dexonsmith created this revision.Nov 21 2019, 6:37 PM
bruno accepted this revision.Nov 22 2019, 6:10 PM

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.

Thanks!

LGTM

This revision is now accepted and ready to land.Nov 22 2019, 6:10 PM