[PATCH] D83154: clang: Add -fcoverage-prefix-map

2021-01-20 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Herald added a reviewer: jansvoboda11. @keith do you plan on landing this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83154/new/ https://reviews.llvm.org/D83154 ___ cfe-commits

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-11-15 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM we may consider implementing `-fsource-dir` in terms of `-fprofile-prefix-map` as suggested in D87928 so I think we should go ahead and land this. Repo

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-22 Thread Keith Smiley via Phabricator via cfe-commits
keith added a comment. Should we wait for that one to land and then pick this one up? Otherwise any thoughts on the outstanding discussion? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83154/new/ https://reviews.llvm.org/D83154 _

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D83154#2286587 , @keith wrote: > With D87928 do you think we would want this > flag as well? The only difference I can think of (besides general UX) is if > you need to remap paths outside of y

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-21 Thread Keith Smiley via Phabricator via cfe-commits
keith added a comment. With D87928 do you think we would want this flag as well? The only difference I can think of (besides general UX) is if you need to remap paths outside of your source root, I believe having a `*-prefix-map` style flag makes that a bit mor

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D83154#2277712 , @phosek wrote: > In D83154#2277539 , @rnk wrote: > >> Yeah, my goal is for the build system to be able to avoid having to embed >> PWD into the compiler flags. For exampl

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-16 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D83154#2277539 , @rnk wrote: > Yeah, my goal is for the build system to be able to avoid having to embed PWD > into the compiler flags. For example, I believe it is a goal of the LLVM gn > build system for the build tree to be

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-16 Thread Reid "Away June-Sep" Kleckner via Phabricator via cfe-commits
rnk added a comment. Yeah, my goal is for the build system to be able to avoid having to embed PWD into the compiler flags. For example, I believe it is a goal of the LLVM gn build system for the build tree to be relocatable. If the compiler command lines need to contain absolute paths to make

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-15 Thread Keith Smiley via Phabricator via cfe-commits
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); phosek wrote: > andrewjcg wrote

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-15 Thread Petr Hosek via Phabricator via cfe-commits
phosek 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); andrewjcg wrote: > keith wrote

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-15 Thread Andrew Gallagher via Phabricator via cfe-commits
andrewjcg 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); keith wrote: > rnk wrote: >

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-12 Thread Keith Smiley via Phabricator via cfe-commits
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: > keith wrote: > > r

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-10 Thread Reid "Away June-Sep" Kleckner via Phabricator via cfe-commits
rnk 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); keith wrote: > rnk wrote: > > Ple

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-09 Thread Keith Smiley via Phabricator via cfe-commits
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 t

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-09 Thread Keith Smiley via Phabricator via cfe-commits
keith updated this revision to Diff 290851. keith marked 2 inline comments as done. keith added a comment. Small fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83154/new/ https://reviews.llvm.org/D83154 Files: clang/include/clang/Basic/Code

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-09 Thread Reid "Away June-Sep" Kleckner via Phabricator via cfe-commits
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, Any reason for the _QA suffix instead of _EQ?

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-08 Thread Keith Smiley via Phabricator via cfe-commits
keith updated this revision to Diff 290610. keith retitled this revision from "clang: Add -fprofile-prefix-map" to "clang: Add -fcoverage-prefix-map". keith edited the summary of this revision. keith added a comment. Rename from fcoverage-prefix-map to fprofile-prefix-map Repository: rG LLVM

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-08-18 Thread Keith Smiley via Phabricator via cfe-commits
keith added a comment. Yes I do, sorry I've been a bit busy, I will try to get to this later this week Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83154/new/ https://reviews.llvm.org/D83154 ___ cfe-com

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-08-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. @keith do you plan on finishing this? I think we should change the name from `-fcoverage-prefix-map` to `-fprofile-prefix-map`, but otherwise it might be good to go. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83154/new/

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D83154#2146085 , @phosek wrote: > In D83154#2134984 , @MaskRay wrote: > > > -fdebug-prefix-map does not make sense to me because coverage is not debug > > info. > > I am on the fence wh

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-07-11 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Herald added a subscriber: dang. In D83154#2134984 , @MaskRay wrote: > -fdebug-prefix-map does not make sense to me because coverage is not debug > info. > I am on the fence whether we need -fcoverage-prefix-map. I created > http

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. -fdebug-prefix-map does not make sense to me because coverage is not debug info. I am on the fence whether we need -fcoverage-prefix-map. I created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96092 (Should --coverage respect -ffile-prefix-map?) Comme

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-07-06 Thread Keith Smiley via Phabricator via cfe-commits
keith added a comment. I originally implemented this behavior behind `-fdebug-prefix-map` but there was some pushback, more context: https://lists.llvm.org/pipermail/cfe-dev/2020-June/065668.html Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83154

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. GCC obtained -fdebug-prefix-map first, then r256847 added both -fmacro-prefix-map and -ffile-prefix-map. GCC doesn't have -fcoverage-prefix-map and I saw your https://github.com/apple/swift/pull/32416 However, do we really need one new -f*-prefix-map for every feature?

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-07-04 Thread Keith Smiley via Phabricator via cfe-commits
keith updated this revision to Diff 275506. keith added a comment. Fix tests on Windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83154/new/ https://reviews.llvm.org/D83154 Files: clang/include/clang/Basic/CodeGenOptions.h clang/include/cl

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-07-03 Thread Keith Smiley via Phabricator via cfe-commits
keith added a comment. Open question: I don't know how all the toolchains fit together, but I noticed that only Clang.cpp handles -fmacro-prefix-map, but Clang.cpp, FreeBSD.cpp, and Gnu.cpp all handle -fdebug-prefix-map. I wasn't sure which pattern I should follow here, so right now this only a

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-07-03 Thread Keith Smiley via Phabricator via cfe-commits
keith created this revision. keith added reviewers: vsk, arphaman, rnk. Herald added a subscriber: dexonsmith. Herald added a project: clang. keith added a comment. Open question: I don't know how all the toolchains fit together, but I noticed that only Clang.cpp handles -fmacro-prefix-map, but C