rnk added inline comments.

================
Comment at: clang/include/clang/Driver/Options.td:1980
     HelpText<"remap file source paths in debug info">;
+def fprofile_prefix_map_QA
+  : Joined<["-"], "fprofile-prefix-map=">, Group<f_Group>,
----------------
Any reason for the _QA suffix instead of _EQ?


================
Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:1334
+  llvm::SmallString<256> Path(Filename);
+  llvm::sys::fs::make_absolute(Path);
+  llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true);
----------------
Please only make the path absolute if nothing in the prefix map matches. 
Otherwise, the user must embed the CWD into the prefix map, which is needlessly 
difficult for the build system. I believe it is also consistent with the way 
that the debug info prefix map works. It appears to operate on the possibly 
relative source paths received on the command line (-I...).


================
Comment at: clang/test/Profile/profile-prefix-map.c:12
+
+// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -emit-llvm 
-mllvm -enable-name-compression=false -main-file-name profile-prefix-map.c 
nested/profile-prefix-map.c -fprofile-prefix-map=%/t/root=. -o - | FileCheck 
--check-prefix=PROFILE-PREFIX-MAP %s --implicit-check-not=root
+//
----------------
See here, for example, where you must pass `-fprofile-prefix-map=%/t/...`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83154

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [P... Keith Smiley via Phabricator via cfe-commits
    • ... Reid "Away June-Sep" Kleckner via Phabricator via cfe-commits
    • ... Keith Smiley via Phabricator via cfe-commits
    • ... Keith Smiley via Phabricator via cfe-commits
    • ... Reid "Away June-Sep" Kleckner via Phabricator via cfe-commits
    • ... Keith Smiley via Phabricator via cfe-commits
    • ... Andrew Gallagher via Phabricator via cfe-commits
    • ... Petr Hosek via Phabricator via cfe-commits
    • ... Keith Smiley via Phabricator via cfe-commits
    • ... Reid "Away June-Sep" Kleckner via Phabricator via cfe-commits
    • ... Petr Hosek via Phabricator via cfe-commits
    • ... Petr Hosek via Phabricator via cfe-commits

Reply via email to