[llvm-cov] Fix missing slash in -path-equivalence
authorZequan Wu <zequanwu@google.com>
Fri, 6 Nov 2020 22:53:57 +0000 (14:53 -0800)
committerZequan Wu <zequanwu@google.com>
Fri, 6 Nov 2020 22:54:11 +0000 (14:54 -0800)
llvm/tools/llvm-cov/CodeCoverage.cpp

index 702c032..8ef4b74 100644 (file)
@@ -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);