summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2005-01-28 01:17:07 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2005-01-28 01:17:07 +0000
commitd19d89a04ca746056e8258543ba580cbde3f31be (patch)
tree15f439871f8c4fce9210552b4a553c1d80bd62c2 /lib
parent097b763ebf5fa5af1856df107d3afaf1855fc8a0 (diff)
Properly close mapped files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19863 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Archive/Archive.cpp2
-rw-r--r--lib/Archive/ArchiveWriter.cpp4
-rw-r--r--lib/Bytecode/Archive/Archive.cpp2
-rw-r--r--lib/Bytecode/Archive/ArchiveWriter.cpp4
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp
index 2d79bd66ed3..aa2db413852 100644
--- a/lib/Archive/Archive.cpp
+++ b/lib/Archive/Archive.cpp
@@ -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
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp
index f16376725d0..6b141857e67 100644
--- a/lib/Archive/ArchiveWriter.cpp
+++ b/lib/Archive/ArchiveWriter.cpp
@@ -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 {
diff --git a/lib/Bytecode/Archive/Archive.cpp b/lib/Bytecode/Archive/Archive.cpp
index 2d79bd66ed3..aa2db413852 100644
--- a/lib/Bytecode/Archive/Archive.cpp
+++ b/lib/Bytecode/Archive/Archive.cpp
@@ -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
diff --git a/lib/Bytecode/Archive/ArchiveWriter.cpp b/lib/Bytecode/Archive/ArchiveWriter.cpp
index f16376725d0..6b141857e67 100644
--- a/lib/Bytecode/Archive/ArchiveWriter.cpp
+++ b/lib/Bytecode/Archive/ArchiveWriter.cpp
@@ -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 {