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 | f6efe58d4585e7fd0b20bac44c3bc027502da121 (patch) | |
tree | 2eb2b4bf55e7e7a445ff923eddf1bee55b7caa52 /clang/lib/Driver/Tools.cpp | |
parent | 88bc848ab64091edf1ced07d51623b0ec8d02427 (diff) | |
download | bcm5719-llvm-f6efe58d4585e7fd0b20bac44c3bc027502da121.tar.gz bcm5719-llvm-f6efe58d4585e7fd0b20bac44c3bc027502da121.zip |
Replace all uses of PathV1::exists with PathV2::fs::exists.
llvm-svn: 123150
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index ee77f48c7c1..50f32958d58 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/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; } |