aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.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/Tools.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/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index ee77f48c7c..50f32958d5 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -25,6 +25,7 @@
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Twine.h"
+#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Host.h"
@@ -224,9 +225,10 @@ void Clang::AddPreprocessingOptions(const Driver &D,
bool FoundPTH = false;
bool FoundPCH = false;
llvm::sys::Path P(A->getValue(Args));
+ bool Exists;
if (UsePCH) {
P.appendSuffix("pch");
- if (P.exists())
+ if (!llvm::sys::fs::exists(P.str(), Exists) && Exists)
FoundPCH = true;
else
P.eraseSuffix();
@@ -234,7 +236,7 @@ void Clang::AddPreprocessingOptions(const Driver &D,
if (!FoundPCH) {
P.appendSuffix("pth");
- if (P.exists())
+ if (!llvm::sys::fs::exists(P.str(), Exists) && Exists)
FoundPTH = true;
else
P.eraseSuffix();
@@ -242,7 +244,7 @@ void Clang::AddPreprocessingOptions(const Driver &D,
if (!FoundPCH && !FoundPTH) {
P.appendSuffix("gch");
- if (P.exists()) {
+ if (!llvm::sys::fs::exists(P.str(), Exists) && Exists) {
FoundPCH = UsePCH;
FoundPTH = !UsePCH;
}