]> granicus.if.org Git - clang/commitdiff
LLVM_ON_WIN32 case: use the proper key in the UniqueFiles map.
authorAxel Naumann <Axel.Naumann@cern.ch>
Wed, 11 Jul 2012 09:41:34 +0000 (09:41 +0000)
committerAxel Naumann <Axel.Naumann@cern.ch>
Wed, 11 Jul 2012 09:41:34 +0000 (09:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160041 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/FileManager.cpp

index 9804105e67166f8b666b748c0e43ca086b089d4e..ddf8934b62738de4610d87082bc0fd748c4c355e 100644 (file)
@@ -112,7 +112,13 @@ public:
 
   size_t size() const { return UniqueFiles.size(); }
 
-  void erase(const FileEntry *Entry) { UniqueFiles.erase(Entry->getName()); }
+  void erase(const FileEntry *Entry) {
+    std::string FullPath(GetFullPath(Entry->getName()));
+
+    // Lowercase string because Windows filesystem is case insensitive.
+    FullPath = StringRef(FullPath).lower();
+    UniqueFiles.erase(FullPath);
+  }
 };
 
 //===----------------------------------------------------------------------===//