From: Craig Topper Date: Wed, 8 Aug 2018 19:14:23 +0000 (+0000) Subject: [CodeGen][Timers] Enable llvm::TimePassesIsEnabled when -ftime-report is specified X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc6514a0292124ec0e627e003d2ec668f2ea472f;p=clang [CodeGen][Timers] Enable llvm::TimePassesIsEnabled when -ftime-report is specified r330571 added a new FrontendTimesIsEnabled variable and replaced many usages of llvm::TimePassesIsEnabled. Including the place that set llvm::TimePassesIsEnabled for -ftime-report. The effect of this is that -ftime-report now only contains the timers specifically referenced in CodeGenAction.cpp and none of the timers in the backend. This commit adds back the assignment, but otherwise leaves everything else unchanged. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339281 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp index d499364002..1a2b0616dc 100644 --- a/lib/CodeGen/CodeGenAction.cpp +++ b/lib/CodeGen/CodeGenAction.cpp @@ -127,6 +127,7 @@ namespace clang { CodeGenOpts, C, CoverageInfo)), LinkModules(std::move(LinkModules)) { FrontendTimesIsEnabled = TimePasses; + llvm::TimePassesIsEnabled = TimePasses; } llvm::Module *getModule() const { return Gen->GetModule(); } std::unique_ptr takeModule() {