mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-06 01:24:35 +00:00
Finishing touch for the std::error_code transition.
While std::error_code itself seems to work OK in all platforms, there are few annoying differences with regards to the std::errc enumeration. This patch adds a simple llvm enumeration, which will hopefully avoid build breakages in other platforms and surprises as we get more uses of std::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210920 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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"
|
||||
@ -58,7 +59,7 @@ bool removeIfExists(StringRef Path) {
|
||||
// This is an approximation, on error we don't know in general if the file
|
||||
// existed or not.
|
||||
std::error_code EC = sys::fs::remove(Path, false);
|
||||
return EC != std::errc::no_such_file_or_directory;
|
||||
return EC != llvm::errc::no_such_file_or_directory;
|
||||
}
|
||||
|
||||
char * current_dir() {
|
||||
|
Reference in New Issue
Block a user