keith added inline comments.

================
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);
----------------
rnk wrote:
> 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...).
Are you suggesting that I try to remap them relatively, and if that fails, 
absolutize it and attempt the remapping again? Or don't absolutize them at all 
anymore?


================
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
+//
----------------
rnk wrote:
> See here, for example, where you must pass `-fprofile-prefix-map=%/t/...`.
+1. I do think I still want this test case, but likely another pending the 
discussion above that validates the relative path behavior.


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
    • ... Keith Smiley via Phabricator via cfe-commits

Reply via email to