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/Frontend/CompilerInstance.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/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index d97e8c77277..901f8fa9276 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/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); |