[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`
Whitney Tsang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 22 10:06:59 PDT 2022
Whitney added inline comments.
================
Comment at: clang/lib/Driver/Driver.cpp:4663
+void InferTimeTracePath(Compilation &C) {
+ bool TimeTrace = C.getArgs().getLastArg(options::OPT_ftime_trace) != nullptr;
+ bool TimeTraceFile =
----------------
Usually bool variable has name that starts with `Has` or something similar, e.g., `HasTimeTraceFile`.
================
Comment at: clang/lib/Driver/Driver.cpp:4702
+
+ // Add or replace -ftime-trace<path>` to the correct one to all clang jobs
+ for (auto &J : C.getJobs()) {
----------------
Do you mean Add or replace the modified `-ftime-trace=<path>` to all clang jobs?
================
Comment at: clang/lib/Driver/Driver.cpp:4739
+
+ // replace `-ftime-trace=<path>`
+ auto &JArgs = J.getArguments();
----------------
should we also replace `-ftime-trace`?
================
Comment at: clang/test/Driver/check-time-trace.cpp:4
+// RUN: %clangxx -ftime-trace -ftime-trace-granularity=0 -o %T/exe/check-time-trace %s
+// RUN: cat %T/exe/check-time-trace*.json \
+// RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
----------------
what may be between `check-time-trace` and `.json`?
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