improve path handling, patch by Baptiste Lepilleur!

llvm-svn: 78824
This commit is contained in:
Chris Lattner
2009-08-12 17:50:39 +00:00
parent c02f3d866f
commit 91f5ff6bce

View File

@@ -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) {