[PATCH] D105139: [llvm-cov] Allow multiple remaps in --path-equivalence
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 24 13:56:50 PDT 2021
vsk added a comment.
Seconding Keith's comment - please add a test.
Also, please describe the behavior change in docs/CommandGuide/llvm-cov.rst. In particular it'd help to clarify the behavior w.r.t multiple remaps. Say you have the following remaps:
/a -> /x
/a/b -> /y
Then (IIUC) a file at "/a/b/t.c" is remapped to "/x/b/t.c", not "/y/t.c", right? I think that's a surprising result, and is at least worth documenting, if not warning about.
================
Comment at: llvm/tools/llvm-cov/CodeCoverage.cpp:794
// PathRemapping.
- auto EquivPair = StringRef(PathRemap).split(',');
- if (!(EquivPair.first.empty() && EquivPair.second.empty()))
- PathRemapping = {std::string(EquivPair.first),
- std::string(EquivPair.second)};
+ StringRef(PathRemap).split(EquivPairs, ',');
+ std::vector<std::pair<std::string, std::string>> Remappings;
----------------
Warn if the number of pairs isn't even?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105139/new/
https://reviews.llvm.org/D105139
More information about the llvm-commits
mailing list