@@ -722,11 +722,9 @@ void CompilerInstance::createCodeCompletionConsumer() {
722722}
723723
724724void CompilerInstance::createFrontendTimer () {
725- FrontendTimerGroup.reset (
726- new llvm::TimerGroup (" frontend" , " Clang front-end time report" ));
725+ timerGroup.reset (new llvm::TimerGroup (" clang" , " Clang time report" ));
727726 FrontendTimer.reset (
728- new llvm::Timer (" frontend" , " Clang front-end timer" ,
729- *FrontendTimerGroup));
727+ new llvm::Timer (" frontend" , " Clang front-end" , *timerGroup));
730728}
731729
732730CodeCompleteConsumer *
@@ -1726,10 +1724,9 @@ void CompilerInstance::createASTReader() {
17261724 const FrontendOptions &FEOpts = getFrontendOpts ();
17271725 std::unique_ptr<llvm::Timer> ReadTimer;
17281726
1729- if (FrontendTimerGroup )
1727+ if (timerGroup )
17301728 ReadTimer = std::make_unique<llvm::Timer>(" reading_modules" ,
1731- " Reading modules" ,
1732- *FrontendTimerGroup);
1729+ " Reading modules" , *timerGroup);
17331730 TheASTReader = new ASTReader (
17341731 getPreprocessor (), getModuleCache (), &getASTContext (),
17351732 getPCHContainerReader (), getFrontendOpts ().ModuleFileExtensions ,
@@ -1758,10 +1755,10 @@ void CompilerInstance::createASTReader() {
17581755bool CompilerInstance::loadModuleFile (
17591756 StringRef FileName, serialization::ModuleFile *&LoadedModuleFile) {
17601757 llvm::Timer Timer;
1761- if (FrontendTimerGroup )
1758+ if (timerGroup )
17621759 Timer.init (" preloading." + FileName.str (), " Preloading " + FileName.str (),
1763- *FrontendTimerGroup );
1764- llvm::TimeRegion TimeLoading (FrontendTimerGroup ? &Timer : nullptr );
1760+ *timerGroup );
1761+ llvm::TimeRegion TimeLoading (timerGroup ? &Timer : nullptr );
17651762
17661763 // If we don't already have an ASTReader, create one now.
17671764 if (!TheASTReader)
@@ -1892,10 +1889,10 @@ ModuleLoadResult CompilerInstance::findOrCompileModuleAndReadAST(
18921889
18931890 // Time how long it takes to load the module.
18941891 llvm::Timer Timer;
1895- if (FrontendTimerGroup )
1892+ if (timerGroup )
18961893 Timer.init (" loading." + ModuleFilename, " Loading " + ModuleFilename,
1897- *FrontendTimerGroup );
1898- llvm::TimeRegion TimeLoading (FrontendTimerGroup ? &Timer : nullptr );
1894+ *timerGroup );
1895+ llvm::TimeRegion TimeLoading (timerGroup ? &Timer : nullptr );
18991896 llvm::TimeTraceScope TimeScope (" Module Load" , ModuleName);
19001897
19011898 // Try to load the module file. If we are not trying to load from the
0 commit comments