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 cc25d33..98979d5 100644
--- a/lib/Basic/FileManager.cpp
+++ b/lib/Basic/FileManager.cpp
@@ -221,6 +221,9 @@
   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) {