[llvm-cov] Check path emptyness in path-equivalence after removing dots.
This commit is contained in:
parent
9a82f42d12
commit
dd388ba3e0
|
@ -475,7 +475,7 @@ void CodeCoverageTool::remapPathNames(const CoverageMapping &Coverage) {
|
|||
SmallString<128> NativePath;
|
||||
sys::path::native(Path, NativePath);
|
||||
sys::path::remove_dots(NativePath, true);
|
||||
if (!sys::path::is_separator(NativePath.back()))
|
||||
if (!NativePath.empty() && !sys::path::is_separator(NativePath.back()))
|
||||
NativePath += sys::path::get_separator();
|
||||
return NativePath.c_str();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue