Index: llvm/lib/Support/FileCollector.cpp =================================================================== --- llvm/lib/Support/FileCollector.cpp +++ llvm/lib/Support/FileCollector.cpp @@ -26,6 +26,7 @@ // exists and is equal to path, it's not case sensitive. Default to case // sensitive in the absence of real_path, since this is the YAMLVFSWriter // default. + // FIXME: Path could've already been ALL CAPS so we should also use lower(). UpperDest = Path.upper(); if (sys::fs::real_path(UpperDest, RealDest) && Path.equals(RealDest)) return false; @@ -178,6 +179,11 @@ std::lock_guard lock(Mutex); VFSWriter.setOverlayDir(OverlayRoot); + // FIXME: Technically even on a case-insensitive file system programs can have + // their own quirks in path handling. Is there actually much to gain by not + // storing paths exactly as requested? IIUC this would lead only to + // deduplication in the mapping as case-insensitive file system would + // "deduplicate" clashing paths automatically. VFSWriter.setCaseSensitivity(isCaseSensitivePath(OverlayRoot)); VFSWriter.setUseExternalNames(false);