mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 15:51:54 +00:00
Fix bugs in class invariant
llvm-svn: 17779
This commit is contained in:
parent
a6b803539a
commit
59872e60ef
@ -53,6 +53,8 @@ void MappedFile::initialize() {
|
|||||||
info_ = 0;
|
info_ = 0;
|
||||||
ThrowErrno(std::string("Can't stat file: ") + path_.get());
|
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() {
|
void* MappedFile::map() {
|
||||||
|
assert(info_ && "MappedFile not initialized");
|
||||||
if (!isMapped()) {
|
if (!isMapped()) {
|
||||||
int prot = PROT_NONE;
|
int prot = PROT_NONE;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user