[cfe-commits] r78824 - /cfe/trunk/lib/Basic/FileManager.cpp

Chris Lattner sabre at nondot.org
Wed Aug 12 10:50:39 PDT 2009


Author: lattner
Date: Wed Aug 12 12:50:39 2009
New Revision: 78824

URL: http://llvm.org/viewvc/llvm-project?rev=78824&view=rev
Log:
improve path handling, patch by Baptiste Lepilleur!

Modified:
    cfe/trunk/lib/Basic/FileManager.cpp

Modified: cfe/trunk/lib/Basic/FileManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/FileManager.cpp?rev=78824&r1=78823&r2=78824&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/FileManager.cpp (original)
+++ cfe/trunk/lib/Basic/FileManager.cpp Wed Aug 12 12:50:39 2009
@@ -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) {





More information about the cfe-commits mailing list