[PATCH] D128048: Add a new clang option "-ftime-trace-path"
dongjunduo via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 20 02:17:44 PDT 2022
dongjunduo added a comment.
In D128048#3591829 <https://reviews.llvm.org/D128048#3591829>, @Whitney wrote:
> Can you please add some test cases?
I have found that new-option unit tests are not included in `clang/test` or `clang/unit-tests`. Could u tell me where I should write the test cases?
================
Comment at: clang/tools/driver/cc1_main.cpp:257
if (llvm::timeTraceProfilerEnabled()) {
- SmallString<128> Path(Clang->getFrontendOpts().OutputFile);
- llvm::sys::path::replace_extension(Path, "json");
+ SmallString<128> Path(Clang->getFrontendOpts().TimeTracePath);
+ Path.append(llvm::sys::path::filename(Clang->getFrontendOpts().OutputFile));
----------------
Whitney wrote:
> What happens when TimeTracePath is not given? Ideally the originally behavior is not changed.
The originally behavior has been restored : )
Time-trace file "*.json" may be saved by following the origin logic if "-ftime-trace-path" is not be specified.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128048/new/
https://reviews.llvm.org/D128048
More information about the cfe-commits
mailing list