[PATCH] D36492: [time-report] Add preprocessor timer

Brian Gesiak via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 19 13:15:17 PDT 2017


modocache added inline comments.


================
Comment at: include/clang/Lex/PreprocessorOptions.h:165
 public:
-  PreprocessorOptions() : UsePredefines(true), DetailedRecord(false),
+  PreprocessorOptions() : PPTimer("preprocessor", "Preprocessing"),
+                          UsePredefines(true),
----------------
eduardo-elizondo wrote:
> Should this be named "Lexing Time" or "Lexing" instead of "Preprocessing"?
Good idea! Now that the timer's being started up in the `Preprocessor::Lex` method, it probably should be named "Lexing". Alternatively, I could move this into, say,` Lexer::Lex`. I guess there's not much of a distinction in Clang between "lexing" and "preprocessing."

I had originally picked this name because that's what appears in `gcc -ftime-report`, but I guess we don't need to keep the names the same.


https://reviews.llvm.org/D36492





More information about the cfe-commits mailing list