mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Don't import make_error_code into the llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210772 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
14e97c4f51
commit
9ac3cc8a25
@ -99,6 +99,7 @@ public:
|
||||
std::is_error_condition_enum<E>::value,
|
||||
void *>::type = 0)
|
||||
: HasError(true) {
|
||||
using std::make_error_code;
|
||||
new (getErrorStorage()) error_code(make_error_code(ErrorCode));
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
namespace llvm {
|
||||
using std::error_code;
|
||||
using std::make_error_code;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -51,7 +51,7 @@ error_code FileOutputBuffer::create(StringRef FilePath,
|
||||
if (EC)
|
||||
return EC;
|
||||
else
|
||||
return make_error_code(std::errc::operation_not_permitted);
|
||||
return std::make_error_code(std::errc::operation_not_permitted);
|
||||
}
|
||||
|
||||
// Delete target file.
|
||||
|
@ -114,7 +114,7 @@ LockFileManager::LockFileManager(StringRef FileName)
|
||||
if (Out.has_error()) {
|
||||
// We failed to write out PID, so make up an excuse, remove the
|
||||
// unique lock file, and fail.
|
||||
Error = make_error_code(std::errc::no_space_on_device);
|
||||
Error = std::make_error_code(std::errc::no_space_on_device);
|
||||
sys::fs::remove(UniqueLockFileName.c_str());
|
||||
return;
|
||||
}
|
||||
|
@ -361,7 +361,7 @@ static error_code getOpenFileImpl(int FD, const char *Filename,
|
||||
if (!Buf) {
|
||||
// Failed to create a buffer. The only way it can fail is if
|
||||
// new(std::nothrow) returns 0.
|
||||
return make_error_code(std::errc::not_enough_memory);
|
||||
return std::make_error_code(std::errc::not_enough_memory);
|
||||
}
|
||||
|
||||
std::unique_ptr<MemoryBuffer> SB(Buf);
|
||||
|
@ -475,7 +475,7 @@ error_code mapped_file_region::init(int FD, bool CloseFD, uint64_t Offset) {
|
||||
_close(FileDescriptor);
|
||||
} else
|
||||
::CloseHandle(FileHandle);
|
||||
return make_error_code(std::errc::invalid_argument);
|
||||
return std::make_error_code(std::errc::invalid_argument);
|
||||
}
|
||||
|
||||
DWORD flprotect;
|
||||
@ -611,7 +611,7 @@ mapped_file_region::mapped_file_region(int fd,
|
||||
if (closefd)
|
||||
_close(FileDescriptor);
|
||||
FileDescriptor = 0;
|
||||
ec = make_error_code(std::errc::bad_file_descriptor);
|
||||
ec = std::make_error_code(std::errc::bad_file_descriptor);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -774,7 +774,7 @@ error_code openFileForRead(const Twine &Name, int &ResultFD) {
|
||||
if (LastError != ERROR_ACCESS_DENIED)
|
||||
return EC;
|
||||
if (is_directory(Name))
|
||||
return make_error_code(std::errc::is_a_directory);
|
||||
return std::make_error_code(std::errc::is_a_directory);
|
||||
return EC;
|
||||
}
|
||||
|
||||
@ -826,7 +826,7 @@ error_code openFileForWrite(const Twine &Name, int &ResultFD,
|
||||
if (LastError != ERROR_ACCESS_DENIED)
|
||||
return EC;
|
||||
if (is_directory(Name))
|
||||
return make_error_code(std::errc::is_a_directory);
|
||||
return std::make_error_code(std::errc::is_a_directory);
|
||||
return EC;
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ bool Input::setCurrentDocument() {
|
||||
Node *N = DocIterator->getRoot();
|
||||
if (!N) {
|
||||
assert(Strm->failed() && "Root is NULL iff parsing failed");
|
||||
EC = make_error_code(std::errc::invalid_argument);
|
||||
EC = std::make_error_code(std::errc::invalid_argument);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ bool Input::preflightKey(const char *Key, bool Required, bool, bool &UseDefault,
|
||||
// nodes are present.
|
||||
if (!CurrentNode) {
|
||||
if (Required)
|
||||
EC = make_error_code(std::errc::invalid_argument);
|
||||
EC = std::make_error_code(std::errc::invalid_argument);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -300,7 +300,7 @@ void Input::setError(HNode *hnode, const Twine &message) {
|
||||
|
||||
void Input::setError(Node *node, const Twine &message) {
|
||||
Strm->printError(node, message);
|
||||
EC = make_error_code(std::errc::invalid_argument);
|
||||
EC = std::make_error_code(std::errc::invalid_argument);
|
||||
}
|
||||
|
||||
Input::HNode *Input::createHNodes(Node *N) {
|
||||
|
@ -453,7 +453,7 @@ int NewArchiveIterator::getFD() const {
|
||||
// Linux cannot open directories with open(2), although
|
||||
// cygwin and *bsd can.
|
||||
if (NewStatus.type() == sys::fs::file_type::directory_file)
|
||||
failIfError(make_error_code(std::errc::is_a_directory), NewFilename);
|
||||
failIfError(std::make_error_code(std::errc::is_a_directory), NewFilename);
|
||||
|
||||
return NewFD;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user