aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-01-10 02:34:13 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-01-10 02:34:13 +0000
commit32bef4edba854303800b3b01cb49a282e5da4f69 (patch)
tree1e56c53a3d423fd84fdf61c72afa45af79bcd823 /lib/Driver/Driver.cpp
parent65423aeb996a296cf2964f136ce4a4a937bd1687 (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/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 8340c0f129..6f2cfb879a 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -1229,7 +1229,8 @@ std::string Driver::GetFilePath(const char *Name, const ToolChain &TC) const {
if (!PrefixDir.empty()) {
llvm::sys::Path P(PrefixDir);
P.appendComponent(Name);
- if (P.exists())
+ bool Exists;
+ if (!llvm::sys::fs::exists(P.str(), Exists) && Exists)
return P.str();
}
@@ -1238,7 +1239,8 @@ std::string Driver::GetFilePath(const char *Name, const ToolChain &TC) const {
it = List.begin(), ie = List.end(); it != ie; ++it) {
llvm::sys::Path P(*it);
P.appendComponent(Name);
- if (P.exists())
+ bool Exists;
+ if (!llvm::sys::fs::exists(P.str(), Exists) && Exists)
return P.str();
}
@@ -1252,7 +1254,9 @@ std::string Driver::GetProgramPath(const char *Name, const ToolChain &TC,
if (!PrefixDir.empty()) {
llvm::sys::Path P(PrefixDir);
P.appendComponent(Name);
- if (WantFile ? P.exists() : P.canExecute())
+ bool Exists;
+ if (WantFile ? !llvm::sys::fs::exists(P.str(), Exists) && Exists
+ : P.canExecute())
return P.str();
}
@@ -1261,7 +1265,9 @@ std::string Driver::GetProgramPath(const char *Name, const ToolChain &TC,
it = List.begin(), ie = List.end(); it != ie; ++it) {
llvm::sys::Path P(*it);
P.appendComponent(Name);
- if (WantFile ? P.exists() : P.canExecute())
+ bool Exists;
+ if (WantFile ? !llvm::sys::fs::exists(P.str(), Exists) && Exists
+ : P.canExecute())
return P.str();
}