aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/HeaderSearch.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-15 04:25:18 +0000
committerChris Lattner <sabre@nondot.org>2009-06-15 04:25:18 +0000
commitb1526f311f124dafc03a8e44d3bd8785fd10e267 (patch)
tree335514c154b397815409b8048e04c4f7ecd53b0e /lib/Lex/HeaderSearch.cpp
parented2d7c4ffd4112ddf10cb95e48428bae0b36377a (diff)
use the new Path::isAbsolute function, fixing a fixme. Patch by Gregory Curfman!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/HeaderSearch.cpp')
-rw-r--r--lib/Lex/HeaderSearch.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp
index 129fa1ae35..9023b11022 100644
--- a/lib/Lex/HeaderSearch.cpp
+++ b/lib/Lex/HeaderSearch.cpp
@@ -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.