mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
[Support] Fix some warnings when self-hosting clang on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186413 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f0d0a1681a
commit
e7ff008462
@ -96,4 +96,9 @@ void llvm::llvm_unreachable_internal(const char *msg, const char *file,
|
||||
dbgs() << " at " << file << ":" << line;
|
||||
dbgs() << "!\n";
|
||||
abort();
|
||||
#ifdef LLVM_BUILTIN_UNREACHABLE
|
||||
// Windows systems and possibly others don't declare abort() to be noreturn,
|
||||
// so use the unreachable builtin to avoid a Clang self-host warning.
|
||||
LLVM_BUILTIN_UNREACHABLE;
|
||||
#endif
|
||||
}
|
||||
|
@ -756,7 +756,6 @@ error_code mapped_file_region::init(int FD, bool CloseFD, uint64_t Offset) {
|
||||
case readonly: flprotect = PAGE_READONLY; break;
|
||||
case readwrite: flprotect = PAGE_READWRITE; break;
|
||||
case priv: flprotect = PAGE_WRITECOPY; break;
|
||||
default: llvm_unreachable("invalid mapping mode");
|
||||
}
|
||||
|
||||
FileMappingHandle = ::CreateFileMapping(FileHandle,
|
||||
@ -780,7 +779,6 @@ error_code mapped_file_region::init(int FD, bool CloseFD, uint64_t Offset) {
|
||||
case readonly: dwDesiredAccess = FILE_MAP_READ; break;
|
||||
case readwrite: dwDesiredAccess = FILE_MAP_WRITE; break;
|
||||
case priv: dwDesiredAccess = FILE_MAP_COPY; break;
|
||||
default: llvm_unreachable("invalid mapping mode");
|
||||
}
|
||||
Mapping = ::MapViewOfFile(FileMappingHandle,
|
||||
dwDesiredAccess,
|
||||
|
Loading…
Reference in New Issue
Block a user