diff options
Diffstat (limited to 'lib/CompilerDriver')
-rw-r--r-- | lib/CompilerDriver/Main.cpp | 4 |
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); |