summaryrefslogtreecommitdiffstats
path: root/clang/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
commit6b8f78eb03d9527fbb25716296a44c60430120f0 (patch)
treec3fb5b7a574e82379c1de86548b9bdd05b720d7e /clang/lib/Lex/HeaderSearch.cpp
parent42670d8b24714b6a7ffd3f7f798d00b86f9ed8e8 (diff)
downloadbcm5719-llvm-6b8f78eb03d9527fbb25716296a44c60430120f0.tar.gz
bcm5719-llvm-6b8f78eb03d9527fbb25716296a44c60430120f0.zip
use the new Path::isAbsolute function, fixing a fixme. Patch by Gregory Curfman!
llvm-svn: 73370
Diffstat (limited to 'clang/lib/Lex/HeaderSearch.cpp')
-rw-r--r--clang/lib/Lex/HeaderSearch.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index 129fa1ae35f..9023b11022b 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud