summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-11-18 19:43:25 +0000
committerMatthias Braun <matze@braunis.de>2016-11-18 19:43:25 +0000
commitae032b6cf553bc9a274bcc2f30a68323a3296b98 (patch)
tree346b9e43d05e52d0c625d18c8a1af50a5fc0ef1e /clang/lib/Frontend/CompilerInstance.cpp
parentdb39fd6c53f8ea68bea29d99001336de95a72cdc (diff)
downloadbcm5719-llvm-ae032b6cf553bc9a274bcc2f30a68323a3296b98.tar.gz
bcm5719-llvm-ae032b6cf553bc9a274bcc2f30a68323a3296b98.zip
Adapt to llvm NamedRegionTimer changes
We have to specify a name and description for the timers and groups now. llvm-svn: 287371
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 6fb880f7867..d314f6d18a6 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -522,9 +522,11 @@ void CompilerInstance::createCodeCompletionConsumer() {
}
void CompilerInstance::createFrontendTimer() {
- FrontendTimerGroup.reset(new llvm::TimerGroup("Clang front-end time report"));
+ FrontendTimerGroup.reset(
+ new llvm::TimerGroup("frontend", "Clang front-end time report"));
FrontendTimer.reset(
- new llvm::Timer("Clang front-end timer", *FrontendTimerGroup));
+ new llvm::Timer("frontend", "Clang front-end timer",
+ *FrontendTimerGroup));
}
CodeCompleteConsumer *
@@ -1324,7 +1326,8 @@ void CompilerInstance::createModuleManager() {
const PreprocessorOptions &PPOpts = getPreprocessorOpts();
std::unique_ptr<llvm::Timer> ReadTimer;
if (FrontendTimerGroup)
- ReadTimer = llvm::make_unique<llvm::Timer>("Reading modules",
+ ReadTimer = llvm::make_unique<llvm::Timer>("reading_modules",
+ "Reading modules",
*FrontendTimerGroup);
ModuleManager = new ASTReader(
getPreprocessor(), getASTContext(), getPCHContainerReader(),
@@ -1357,7 +1360,8 @@ void CompilerInstance::createModuleManager() {
bool CompilerInstance::loadModuleFile(StringRef FileName) {
llvm::Timer Timer;
if (FrontendTimerGroup)
- Timer.init("Preloading " + FileName.str(), *FrontendTimerGroup);
+ Timer.init("preloading." + FileName.str(), "Preloading " + FileName.str(),
+ *FrontendTimerGroup);
llvm::TimeRegion TimeLoading(FrontendTimerGroup ? &Timer : nullptr);
// Helper to recursively read the module names for all modules we're adding.
@@ -1509,7 +1513,8 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
llvm::Timer Timer;
if (FrontendTimerGroup)
- Timer.init("Loading " + ModuleFileName, *FrontendTimerGroup);
+ Timer.init("loading." + ModuleFileName, "Loading " + ModuleFileName,
+ *FrontendTimerGroup);
llvm::TimeRegion TimeLoading(FrontendTimerGroup ? &Timer : nullptr);
// Try to load the module file. If we are trying to load from the prebuilt
OpenPOWER on IntegriCloud