[PATCH] D128048: Add a new clang option "-ftime-trace-path"

Whitney Tsang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 17 06:24:15 PDT 2022


Whitney added a comment.

Can you please add some 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));
----------------
What happens when TimeTracePath is not given? Ideally the originally behavior is not changed. 


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