[cfe-commits] r73370 - /cfe/trunk/lib/Lex/HeaderSearch.cpp

Chris Lattner sabre at nondot.org
Sun Jun 14 21:25:18 PDT 2009


Author: lattner
Date: Sun Jun 14 23:25:18 2009
New Revision: 73370

URL: http://llvm.org/viewvc/llvm-project?rev=73370&view=rev
Log:
use the new Path::isAbsolute function, fixing a fixme.  Patch by Gregory Curfman!

Modified:
    cfe/trunk/lib/Lex/HeaderSearch.cpp

Modified: cfe/trunk/lib/Lex/HeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/HeaderSearch.cpp?rev=73370&r1=73369&r2=73370&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/HeaderSearch.cpp (original)
+++ cfe/trunk/lib/Lex/HeaderSearch.cpp Sun Jun 14 23:25:18 2009
@@ -215,9 +215,7 @@
                                           const DirectoryLookup *&CurDir,
                                           const FileEntry *CurFileEnt) {
   // If 'Filename' is absolute, check to see if it exists and no searching.
-  // FIXME: Portability.  This should be a sys::Path interface, this doesn't
-  // handle things like C:\foo.txt right, nor win32 \\network\device\blah.
-  if (FilenameStart[0] == '/') {
+  if (llvm::sys::Path::isAbsolute(FilenameStart, FilenameEnd-FilenameStart)) {
     CurDir = 0;
 
     // If this was an #include_next "/absolute/file", fail.





More information about the cfe-commits mailing list