[llvm] c75a0a1 - [llvm-cov] Fix missing slash in -path-equivalence

Zequan Wu via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 14:54:19 PST 2020


Author: Zequan Wu
Date: 2020-11-06T14:54:11-08:00
New Revision: c75a0a1e9dc29be4e00d37d0d00288afc1a6153f

URL: https://github.com/llvm/llvm-project/commit/c75a0a1e9dc29be4e00d37d0d00288afc1a6153f
DIFF: https://github.com/llvm/llvm-project/commit/c75a0a1e9dc29be4e00d37d0d00288afc1a6153f.diff

LOG: [llvm-cov] Fix missing slash in -path-equivalence

Added: 
    

Modified: 
    llvm/tools/llvm-cov/CodeCoverage.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp
index 702c03237f17..8ef4b747a0fb 100644
--- a/llvm/tools/llvm-cov/CodeCoverage.cpp
+++ b/llvm/tools/llvm-cov/CodeCoverage.cpp
@@ -399,9 +399,9 @@ void CodeCoverageTool::remapPathNames(const CoverageMapping &Coverage) {
       return "";
     SmallString<128> NativePath;
     sys::path::native(Path, NativePath);
+    sys::path::remove_dots(NativePath, true);
     if (!sys::path::is_separator(NativePath.back()))
       NativePath += sys::path::get_separator();
-    sys::path::remove_dots(NativePath, true);
     return NativePath.c_str();
   };
   std::string RemapFrom = nativeWithTrailing(PathRemapping->first);


        


More information about the llvm-commits mailing list