summaryrefslogtreecommitdiff
path: root/lib/CompilerDriver
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-01-10 02:34:23 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-01-10 02:34:23 +0000
commit54453f2978c76b3aa71be7bb4e9657c8539f8648 (patch)
tree007baedd6ba7bd7752feb8443472dd84cdea43cb /lib/CompilerDriver
parentf4afaa81f2d1736a4115a22c96d8188178f11cfc (diff)
downloadllvm-54453f2978c76b3aa71be7bb4e9657c8539f8648.tar.gz
llvm-54453f2978c76b3aa71be7bb4e9657c8539f8648.tar.bz2
llvm-54453f2978c76b3aa71be7bb4e9657c8539f8648.tar.xz
Support/Path: Deprecate PathV1::exists and replace all uses with PathV2::fs::exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CompilerDriver')
-rw-r--r--lib/CompilerDriver/Main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CompilerDriver/Main.cpp b/lib/CompilerDriver/Main.cpp
index 88cfdb2123..7120027f7c 100644
--- a/lib/CompilerDriver/Main.cpp
+++ b/lib/CompilerDriver/Main.cpp
@@ -16,6 +16,7 @@
#include "llvm/CompilerDriver/CompilationGraph.h"
#include "llvm/CompilerDriver/Error.h"
+#include "llvm/Support/FileSystem.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Path.h"
@@ -50,7 +51,8 @@ namespace {
return 0;
}
- if (!tempDir.exists()) {
+ bool Exists;
+ if (llvm::sys::fs::exists(tempDir.str(), Exists) || !Exists) {
std::string ErrMsg;
if (tempDir.createDirectoryOnDisk(true, &ErrMsg)) {
PrintError(ErrMsg);