Fix bugs in class invariant

llvm-svn: 17779
This commit is contained in:
Reid Spencer 2004-11-14 22:07:50 +00:00
parent 8b89b8333e
commit 60c72a339b
1 changed files with 3 additions and 0 deletions

View File

@ -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;