lebedev.ri added inline comments.

================
Comment at: clang/lib/Driver/Driver.cpp:4531-4548
+    // Get linking executable file's parent path as TracePath's parent path,
+    // default is ".". Filename may be determined and added into TracePath 
then.
+    //
+    // e.g. executable file's path: /usr/local/a.out
+    //      its parent's path:      /usr/local
+    for (auto &J : C.getJobs()) {
+      if (J.getSource().getKind() == Action::LinkJobClass) {
----------------
Maetveis wrote:
> Instead of looking for linking jobs, to determine the folder to store the 
> traces, you could use the output location from `-o <output>` (if specified).
> This is already available in `Driver::BuildJobs` as `FinalOutput` (see on 
> line 4605), it will be `nullptr` if no `-o` option was given.
Looks like this was not addressed.
I would suspect, not doing so will break **The** most common use case
of separately compiling sources and then linking them together, does it not?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131469/new/

https://reviews.llvm.org/D131469

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to