LLVM_ON_WIN32 case: use the proper key in the UniqueFiles map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160041 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/FileManager.cpp b/lib/Basic/FileManager.cpp
index 9804105..ddf8934 100644
--- a/lib/Basic/FileManager.cpp
+++ b/lib/Basic/FileManager.cpp
@@ -112,7 +112,13 @@
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);
+ }
};
//===----------------------------------------------------------------------===//