mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Fix bugs in class invariant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fb9aac85cd
commit
083507cd3f
@ -53,6 +53,8 @@ void MappedFile::initialize() {
|
||||
info_ = 0;
|
||||
ThrowErrno(std::string("Can't stat file: ") + path_.get());
|
||||
}
|
||||
} else {
|
||||
throw std::string("Can't open file: ") + path_.get();
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,6 +76,7 @@ void MappedFile::unmap() {
|
||||
}
|
||||
|
||||
void* MappedFile::map() {
|
||||
assert(info_ && "MappedFile not initialized");
|
||||
if (!isMapped()) {
|
||||
int prot = PROT_NONE;
|
||||
int flags = 0;
|
||||
|
@ -53,6 +53,8 @@ void MappedFile::initialize() {
|
||||
info_ = 0;
|
||||
ThrowErrno(std::string("Can't stat file: ") + path_.get());
|
||||
}
|
||||
} else {
|
||||
throw std::string("Can't open file: ") + path_.get();
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,6 +76,7 @@ void MappedFile::unmap() {
|
||||
}
|
||||
|
||||
void* MappedFile::map() {
|
||||
assert(info_ && "MappedFile not initialized");
|
||||
if (!isMapped()) {
|
||||
int prot = PROT_NONE;
|
||||
int flags = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user