[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

dongjunduo via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 13 23:47:13 PDT 2022


dongjunduo added inline comments.


================
Comment at: clang/lib/Driver/Driver.cpp:4516
+  bool HasTimeTrace = C.getArgs().hasArg(options::OPT_ftime_trace);
+  bool HasTimeTraceFile = C.getArgs().hasArg(options::OPT_ftime_trace_EQ);
+  // Whether `-ftime-trace` or `-ftime-trace=<path>` are specified
----------------
MaskRay wrote:
> Change this variable to use `getLastArg(options::OPT_ftime_trace_EQ)` instead.
> 
> The convention is to use getLastArg if both hasArg and getLastArg are needed.
Emmm, do you means `HasTimeTrace` and `HasTimeTraceFile`'s initialized approach shoud be reverted into the last version?


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