use the new Path::isAbsolute function, fixing a fixme. Patch by Gregory Curfman!

llvm-svn: 73370
This commit is contained in:
Chris Lattner 2009-06-15 04:25:18 +00:00
parent 42670d8b24
commit 6b8f78eb03
1 changed files with 1 additions and 3 deletions

View 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.