[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`
Whitney Tsang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 9 06:10:56 PDT 2022
Whitney added inline comments.
================
Comment at: clang/lib/Driver/Driver.cpp:4739
+ // set data storing path of the options `-ftime-trace`, `-ftime-trace=<path>`
+ bool TimeTrace = C.getArgs().getLastArg(options::OPT_ftime_trace) != nullptr;
----------------
It would be cleaner if all these logic can be moved to a separate function with a description.
================
Comment at: clang/lib/Driver/Driver.cpp:4753
+ else
+ LinkingResParentPath = ".";
+ }
----------------
Do you expect link only show up once? If so, you can add a break here.
================
Comment at: clang/tools/driver/cc1_main.cpp:260
+ SmallString<128> TracePath(Clang->getFrontendOpts().TimeTracePath);
if (auto profilerOutput = Clang->createOutputFile(
+ TracePath.str(), /*Binary=*/false, /*RemoveFileOnSignal=*/false,
----------------
Should we assert that TimeTracePath is not empty?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131469/new/
https://reviews.llvm.org/D131469
More information about the cfe-commits
mailing list