mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 02:32:08 +00:00
Properly close mapped files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19863 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
097b763ebf
commit
d19d89a04c
@ -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 {
|
||||
|
@ -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