1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Properly close mapped files.

llvm-svn: 19863
This commit is contained in:
Jeff Cohen 2005-01-28 01:17:07 +00:00
parent 6ab12b6b90
commit df055196d4
2 changed files with 3 additions and 3 deletions

View File

@ -143,7 +143,7 @@ Archive::Archive(const sys::Path& filename, bool map )
Archive::~Archive() {
// Shutdown the file mapping
if (mapfile) {
mapfile->unmap();
mapfile->close();
delete mapfile;
}
// Delete any ModuleProviders and ArchiveMember's we've allocated as a result

View File

@ -303,7 +303,7 @@ Archive::writeMember(
// Close the mapped file if it was opened
if (mFile != 0) {
mFile->unmap();
mFile->close();
delete mFile;
}
}
@ -442,7 +442,7 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress){
// Close up shop
FinalFile.close();
arch.unmap();
arch.close();
TmpArchive.destroyFile();
} else {