[PATCH] D97001: [Coverage] Normalize compilation dir as well

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 18 15:02:28 PST 2021


phosek created this revision.
phosek added a reviewer: vsk.
phosek requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This matches debug info behavior.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97001

Files:
  clang/lib/CodeGen/CoverageMappingGen.cpp


Index: clang/lib/CodeGen/CoverageMappingGen.cpp
===================================================================
--- clang/lib/CodeGen/CoverageMappingGen.cpp
+++ clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -1726,7 +1726,7 @@
   llvm::SmallVector<std::string, 16> FilenameStrs;
   FilenameStrs.resize(FileEntries.size() + 1);
   // The first filename is the current working directory.
-  FilenameStrs[0] = getCurrentDirname();
+  FilenameStrs[0] = normalizeFilename(getCurrentDirname());
   for (const auto &Entry : FileEntries) {
     auto I = Entry.second;
     FilenameStrs[I] = normalizeFilename(Entry.first->getName());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97001.324786.patch
Type: text/x-patch
Size: 627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210218/e15ef9c1/attachment.bin>


More information about the cfe-commits mailing list