diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-01-10 02:34:13 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-01-10 02:34:13 +0000 |
commit | 32bef4edba854303800b3b01cb49a282e5da4f69 (patch) | |
tree | 1e56c53a3d423fd84fdf61c72afa45af79bcd823 /lib/Lex/HeaderSearch.cpp | |
parent | 65423aeb996a296cf2964f136ce4a4a937bd1687 (diff) |
Replace all uses of PathV1::exists with PathV2::fs::exists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/HeaderSearch.cpp')
-rw-r--r-- | lib/Lex/HeaderSearch.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp index d11e87f8a9..428af8648b 100644 --- a/lib/Lex/HeaderSearch.cpp +++ b/lib/Lex/HeaderSearch.cpp @@ -15,6 +15,7 @@ #include "clang/Lex/HeaderMap.h" #include "clang/Basic/FileManager.h" #include "clang/Basic/IdentifierTable.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/ADT/SmallString.h" #include <cstdio> @@ -170,8 +171,8 @@ const FileEntry *DirectoryLookup::DoFrameworkLookup(llvm::StringRef Filename, // If the framework dir doesn't exist, we fail. // FIXME: It's probably more efficient to query this with FileMgr.getDir. - if (!llvm::sys::Path(std::string(FrameworkName.begin(), - FrameworkName.end())).exists()) + bool Exists; + if (llvm::sys::fs::exists(FrameworkName.str(), Exists) || !Exists) return 0; // Otherwise, if it does, remember that this is the right direntry for this |