From: Chris Lattner Date: Wed, 12 Aug 2009 17:50:39 +0000 (+0000) Subject: improve path handling, patch by Baptiste Lepilleur! X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=46730b261c46765c51a9aa83c2571a2a8705482a;p=clang improve path handling, patch by Baptiste Lepilleur! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78824 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/FileManager.cpp b/lib/Basic/FileManager.cpp index cc25d33051..98979d56cf 100644 --- a/lib/Basic/FileManager.cpp +++ b/lib/Basic/FileManager.cpp @@ -221,6 +221,9 @@ const FileEntry *FileManager::getFile(const char *NameStart, const char *SlashPos = NameEnd-1; while (SlashPos >= NameStart && !IS_DIR_SEPARATOR_CHAR(SlashPos[0])) --SlashPos; + // Ignore duplicate //'s. + while (SlashPos > NameStart && IS_DIR_SEPARATOR_CHAR(SlashPos[-1])) + --SlashPos; const DirectoryEntry *DirInfo; if (SlashPos < NameStart) {