summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorAndrew V. Tischenko <andrew.v.tischenko@gmail.com>2018-04-10 10:34:13 +0000
committerAndrew V. Tischenko <andrew.v.tischenko@gmail.com>2018-04-10 10:34:13 +0000
commitc88deb100f1d4a1d14dbcc42de01d325919ebec6 (patch)
tree36fe084ef5681b5e643f8eb90483a14f00df70d4 /clang/lib/Frontend/CompilerInstance.cpp
parent037d3b20d3c0d9ea5c90aec9de3a5257d46b70c9 (diff)
downloadbcm5719-llvm-c88deb100f1d4a1d14dbcc42de01d325919ebec6.tar.gz
bcm5719-llvm-c88deb100f1d4a1d14dbcc42de01d325919ebec6.zip
-ftime-report switch support in Clang.
The current support of the feature produces only 2 lines in report: -Some general Code Generation Time; -Total time of Backend Consumer actions. This patch extends Clang time report with new lines related to Preprocessor, Include Filea Search, Parsing, etc. Differential Revision: https://reviews.llvm.org/D43578 llvm-svn: 329684
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index b8f55b61427..904e5876814 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -54,6 +54,8 @@
#include <utility>
using namespace clang;
+static const char *const GroupName = "frontend";
+static const char *const GroupDescription = "===== Frontend =====";
CompilerInstance::CompilerInstance(
std::shared_ptr<PCHContainerOperations> PCHContainerOps,
@@ -935,6 +937,10 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) {
assert(!getFrontendOpts().ShowHelp && "Client must handle '-help'!");
assert(!getFrontendOpts().ShowVersion && "Client must handle '-version'!");
+ llvm::NamedRegionTimer T("compilerinstance", "Compiler Instance actions",
+ GroupName, GroupDescription,
+ llvm::TimePassesIsEnabled);
+
// FIXME: Take this as an argument, once all the APIs we used have moved to
// taking it as an input instead of hard-coding llvm::errs.
raw_ostream &OS = llvm::errs();
OpenPOWER on IntegriCloud