Modules: Simplify CompilerInstance constructor, NFC

Initialize fields directly in header.  Note that the ModuleManager field is an
IntrusiveRefCntPtr, so there's no need for explicit initialization.

llvm-svn: 293863
This commit is contained in:
Duncan P. N. Exon Smith 2017-02-02 05:09:51 +00:00
parent b81e6c48f8
commit 1116d6915c
2 changed files with 4 additions and 7 deletions

View File

@ -142,13 +142,13 @@ class CompilerInstance : public ModuleLoader {
/// \brief Whether we should (re)build the global module index once we
/// have finished with this translation unit.
bool BuildGlobalModuleIndex;
bool BuildGlobalModuleIndex = false;
/// \brief We have a full global module index, with all modules.
bool HaveFullGlobalModuleIndex;
bool HaveFullGlobalModuleIndex = false;
/// \brief One or more modules failed to build.
bool ModuleBuildFailed;
bool ModuleBuildFailed = false;
/// \brief Holds information about the output file.
///

View File

@ -57,10 +57,7 @@ CompilerInstance::CompilerInstance(
std::shared_ptr<PCHContainerOperations> PCHContainerOps,
bool BuildingModule)
: ModuleLoader(BuildingModule), Invocation(new CompilerInvocation()),
ModuleManager(nullptr),
ThePCHContainerOperations(std::move(PCHContainerOps)),
BuildGlobalModuleIndex(false), HaveFullGlobalModuleIndex(false),
ModuleBuildFailed(false) {}
ThePCHContainerOperations(std::move(PCHContainerOps)) {}
CompilerInstance::~CompilerInstance() {
assert(OutputFiles.empty() && "Still output files in flight?");