diff options
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; |