diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2021-08-22 19:00:43 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2021-11-13 20:39:49 +0000 |
commit | fe6060f10f634930ff71b7c50291ddc610da2475 (patch) | |
tree | 1483580c790bd4d27b6500a7542b5ee00534d3cc /contrib/llvm-project/llvm/lib/Support/FileCollector.cpp | |
parent | b61bce17f346d79cecfd8f195a64b10f77be43b1 (diff) | |
parent | 344a3780b2e33f6ca763666c380202b18aab72a3 (diff) |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/FileCollector.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Support/FileCollector.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/FileCollector.cpp b/contrib/llvm-project/llvm/lib/Support/FileCollector.cpp index 99482075f675..5854baeebbb9 100644 --- a/contrib/llvm-project/llvm/lib/Support/FileCollector.cpp +++ b/contrib/llvm-project/llvm/lib/Support/FileCollector.cpp @@ -35,7 +35,7 @@ static bool isCaseSensitivePath(StringRef Path) { SmallString<256> TmpDest = Path, UpperDest, RealDest; // Remove component traversals, links, etc. - if (!sys::fs::real_path(Path, TmpDest)) + if (sys::fs::real_path(Path, TmpDest)) return true; // Current default value in vfs.yaml Path = TmpDest; @@ -44,7 +44,7 @@ static bool isCaseSensitivePath(StringRef Path) { // sensitive in the absence of real_path, since this is the YAMLVFSWriter // default. UpperDest = Path.upper(); - if (sys::fs::real_path(UpperDest, RealDest) && Path.equals(RealDest)) + if (!sys::fs::real_path(UpperDest, RealDest) && Path.equals(RealDest)) return false; return true; } @@ -241,7 +241,7 @@ std::error_code FileCollector::writeMapping(StringRef MappingFile) { VFSWriter.setUseExternalNames(false); std::error_code EC; - raw_fd_ostream os(MappingFile, EC, sys::fs::OF_Text); + raw_fd_ostream os(MappingFile, EC, sys::fs::OF_TextWithCRLF); if (EC) return EC; |