[PATCH] D99695: [llvm-cov] Use -path-equivalence to support relative path.

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 1 11:37:02 PDT 2021


phosek added a comment.

In D99695#2664701 <https://reviews.llvm.org/D99695#2664701>, @vsk wrote:

> I think then you would somehow need multiple -compilation-dir options if e.g. you have paths with different levels of ../ nesting, e.g. ../../foo.c and ../../../../bar.c. That sounds like it could become hard to manage.
>
> In RawCoverageFilenamesReader::readUncompressed, we do:
>
>   SmallString<256> P(CWD);
>   llvm::sys::path::append(P, Filename);
>
> Can this just be turned into an absolute path?

The flag would override the compilation dir that's stored inside the profile (the 0th path entry) so there should be just one. In that code snippet, it means overriding `CWD`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99695



More information about the llvm-commits mailing list