diff options
Diffstat (limited to 'unittests/Transforms/DebugIR/DebugIR.cpp')
-rw-r--r-- | unittests/Transforms/DebugIR/DebugIR.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/unittests/Transforms/DebugIR/DebugIR.cpp b/unittests/Transforms/DebugIR/DebugIR.cpp index 9b89c15..41df147 100644 --- a/unittests/Transforms/DebugIR/DebugIR.cpp +++ b/unittests/Transforms/DebugIR/DebugIR.cpp @@ -18,6 +18,7 @@ #include "llvm/IR/DIBuilder.h" #include "llvm/IR/DebugInfo.h" #include "llvm/IR/Module.h" +#include "llvm/Support/Errc.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Host.h" #include "llvm/Support/Path.h" @@ -57,7 +58,7 @@ void insertCUDescriptor(Module *M, StringRef File, StringRef Dir, bool removeIfExists(StringRef Path) { // This is an approximation, on error we don't know in general if the file // existed or not. - llvm::error_code EC = sys::fs::remove(Path, false); + std::error_code EC = sys::fs::remove(Path, false); return EC != llvm::errc::no_such_file_or_directory; } @@ -65,7 +66,7 @@ char * current_dir() { #if defined(LLVM_ON_WIN32) || defined(HAVE_GETCWD) // calling getcwd (or _getcwd() on windows) with a null buffer makes it // allocate a sufficiently sized buffer to store the current working dir. - return getcwd_impl(0, 0); + return getcwd_impl(nullptr, 0); #else return 0; #endif |