Skip to content

Commit 381d053

Browse files
committed
[rebranch] Fix up a incorrect main -> next merge
`CoverageFilenamesSectionWriter` now takes an `ArrayRef<std::string>` rather than `ArrayRef<StringRef>`. stable/20210726 reverted that change so that the coverage formats were the same. stable/20211026 doesn't have that revert though.
1 parent de79a71 commit 381d053

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/IRGen/GenCoverage.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,20 @@ void IRGenModule::emitCoverageMapping() {
6666
Files.push_back(M->getFile());
6767

6868
auto remapper = getOptions().CoveragePrefixMap;
69-
// Awkwardly munge absolute filenames into a vector of StringRefs.
69+
7070
llvm::SmallVector<std::string, 8> FilenameStrs;
71-
llvm::SmallVector<StringRef, 8> FilenameRefs;
7271
for (StringRef Name : Files) {
7372
llvm::SmallString<256> Path(Name);
7473
llvm::sys::fs::make_absolute(Path);
7574
FilenameStrs.push_back(remapper.remapPath(Path));
76-
FilenameRefs.push_back(FilenameStrs.back());
7775
}
7876

7977
// Encode the filenames.
8078
std::string Filenames;
8179
llvm::LLVMContext &Ctx = getLLVMContext();
8280
{
8381
llvm::raw_string_ostream OS(Filenames);
84-
llvm::coverage::CoverageFilenamesSectionWriter(FilenameRefs).write(OS);
82+
llvm::coverage::CoverageFilenamesSectionWriter(FilenameStrs).write(OS);
8583
}
8684
auto *FilenamesVal =
8785
llvm::ConstantDataArray::getString(Ctx, Filenames, false);

0 commit comments

Comments
 (0)