Skip to content

Commit

Permalink
Revert "[CoverageMapping] Remove dots from paths inside the profile"
Browse files Browse the repository at this point in the history
This reverts commit d1b098f since
it is failing on Windows builders.
  • Loading branch information
petrhosek committed Jun 28, 2022
1 parent d1b098f commit 834a38b
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 37 deletions.
3 changes: 1 addition & 2 deletions llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
Expand Up @@ -175,8 +175,7 @@ Error RawCoverageFilenamesReader::readUncompressed(CovMapVersion Version,
else
P.assign(CWD);
llvm::sys::path::append(P, Filename);
sys::path::remove_dots(P, /*remove_dot_dot=*/true);
Filenames.push_back(static_cast<std::string>(P.str()));
Filenames.push_back(static_cast<std::string>(P));
}
}
}
Expand Down
1 change: 0 additions & 1 deletion llvm/test/tools/llvm-cov/Inputs/relative_dir/header.h

This file was deleted.

5 changes: 0 additions & 5 deletions llvm/test/tools/llvm-cov/Inputs/relative_dir/main.c

This file was deleted.

Binary file not shown.
16 changes: 0 additions & 16 deletions llvm/test/tools/llvm-cov/Inputs/relative_dir/main.proftext

This file was deleted.

2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-cov/coverage-prefix-map.test
Expand Up @@ -13,7 +13,7 @@
# REPORT: {{^}}bar.h{{.*}}
# REPORT: {{^}}TOTAL{{.*}}100.00%

# LCOV: SF:bar.h
# LCOV: SF:.{{/|\\+}}bar.h
# LCOV-NOT: SF

Instructions for regenerating the test:
Expand Down
10 changes: 0 additions & 10 deletions llvm/test/tools/llvm-cov/relative-dir.test

This file was deleted.

4 changes: 2 additions & 2 deletions llvm/unittests/ProfileData/CoverageMappingTest.cpp
Expand Up @@ -943,7 +943,7 @@ TEST(CoverageMappingTest, filename_roundtrip) {
for (unsigned I = 1; I < Paths.size(); ++I) {
SmallString<256> P(Paths[0]);
llvm::sys::path::append(P, Paths[I]);
ASSERT_EQ(ReadFilenames[I], P);
ASSERT_TRUE(ReadFilenames[I] == P);
}
}
}
Expand All @@ -969,7 +969,7 @@ TEST(CoverageMappingTest, filename_compilation_dir) {
for (unsigned I = 1; I < Paths.size(); ++I) {
SmallString<256> P(CompilationDir);
llvm::sys::path::append(P, Paths[I]);
ASSERT_EQ(ReadFilenames[I], P);
ASSERT_TRUE(ReadFilenames[I] == P);
}
}
}
Expand Down

0 comments on commit 834a38b

Please sign in to comment.