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/Frontend/CompilerInstance.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/Frontend/CompilerInstance.cpp')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index d97e8c7727..901f8fa927 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -28,6 +28,7 @@ #include "clang/Serialization/ASTReader.h" #include "clang/Sema/CodeCompleteConsumer.h" #include "llvm/LLVMContext.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/Statistic.h" @@ -433,7 +434,8 @@ CompilerInstance::createOutputFile(llvm::StringRef OutputPath, llvm::sys::Path OutPath(OutFile); // Only create the temporary if we can actually write to OutPath, otherwise // we want to fail early. - if (!OutPath.exists() || + bool Exists; + if ((llvm::sys::fs::exists(OutPath.str(), Exists) || !Exists) || (OutPath.isRegularFile() && OutPath.canWrite())) { // Create a temporary file. llvm::sys::Path TempPath(OutFile); |