From: Axel Naumann Date: Wed, 11 Jul 2012 09:41:34 +0000 (+0000) Subject: LLVM_ON_WIN32 case: use the proper key in the UniqueFiles map. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be779598aa70a71c56e5d576947ade53e249c602;p=clang 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 9804105e67..ddf8934b62 100644 --- a/lib/Basic/FileManager.cpp +++ b/lib/Basic/FileManager.cpp @@ -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); + } }; //===----------------------------------------------------------------------===//