[llvm] [NFC][Support] Add an include file for time profiler helpers for tools (PR #152416)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 8 13:53:15 PDT 2025
https://github.com/mshockwave commented:
Personally I prefer:
1. Put the RAII class in `llvm/Support/TimeProfiler.h`
2. Define command line options in `lib/Support/TimeProfile.cpp`, and _maybe_ provide getter functions for options that user might want to access (e.g. `time-trace-file`)
For the RAII class, you could provide a variety of ctors so that users can either choose to supply their time trace file path / granularity or using the ones given by the command line options.
https://github.com/llvm/llvm-project/pull/152416
More information about the llvm-commits
mailing list