[PATCH] D78957: [WIP][FileCollector] isCaseSensitivePath

Jan Korous via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 12:55:50 PDT 2020


jkorous created this revision.
jkorous added a reviewer: JDevlieghere.
Herald added subscribers: llvm-commits, dexonsmith, hiraditya.
Herald added a project: LLVM.

https://reviews.llvm.org/D78957

Files:
  llvm/lib/Support/FileCollector.cpp


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<std::mutex> 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);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78957.260414.patch
Type: text/x-patch
Size: 1150 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200427/2357c938/attachment.bin>


More information about the llvm-commits mailing list