]> granicus.if.org Git - clang/commitdiff
use the new Path::isAbsolute function, fixing a fixme. Patch by Gregory Curfman!
authorChris Lattner <sabre@nondot.org>
Mon, 15 Jun 2009 04:25:18 +0000 (04:25 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 15 Jun 2009 04:25:18 +0000 (04:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73370 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/HeaderSearch.cpp

index 129fa1ae35fae1bb8a49e17df8ba2f3d851a57e7..9023b11022b1b37bf6631c3b5e22285e572a4a91 100644 (file)
@@ -215,9 +215,7 @@ const FileEntry *HeaderSearch::LookupFile(const char *FilenameStart,
                                           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.