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:
parent
6ab12b6b90
commit
df055196d4
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user