[PATCH] D45619: [Time-report] (1) Use special new Clang flag 'FrontendTimesIsEnabled' instead of 'llvm::TimePassesIsEnabled' inside -ftime-report feature

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 13 11:26:13 PDT 2018


efriedma added a comment.

This makes sense.



================
Comment at: include/clang/Frontend/Utils.h:241
+/// then the value of this boolean will be true, otherwise false.
+extern bool FrontendTimesIsEnabled;
+
----------------
Don't really like global variables, but I guess timers are global state anyway, so this isn't really making anything worse.


================
Comment at: lib/Basic/FrontendTiming.cpp:18
+
+bool FrontendTimesIsEnabled = false;
+
----------------
Why is this in lib/Basic, when the declaration is in include/clang/Frontend/?


https://reviews.llvm.org/D45619





More information about the cfe-commits mailing list