summaryrefslogtreecommitdiff
path: root/lib/Archive
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-01 03:10:22 +0000
committerChris Lattner <sabre@nondot.org>2008-04-01 03:10:22 +0000
commitbdbd2d710c665bcdf31cbed4b44cf3f94ba746e7 (patch)
tree7ad9a631dd43e31b57f7e0910fdc78d47eae484f /lib/Archive
parent558755ce1af80a44e9d5f399584e9b2112583796 (diff)
Remove MappedFile support for mapping files for write and exec
and shared. This complicates the design, is not used, and probably doesn't even work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Archive')
-rw-r--r--lib/Archive/Archive.cpp2
-rw-r--r--lib/Archive/ArchiveWriter.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp
index 125b22e9d94..c5da1145384 100644
--- a/lib/Archive/Archive.cpp
+++ b/lib/Archive/Archive.cpp
@@ -148,7 +148,7 @@ bool
Archive::mapToMemory(std::string* ErrMsg)
{
mapfile = new sys::MappedFile();
- if (mapfile->open(archPath, sys::MappedFile::READ_ACCESS, ErrMsg))
+ if (mapfile->open(archPath, ErrMsg))
return true;
if (!(base = (char*) mapfile->map(ErrMsg)))
return true;
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp
index c73e170ee7a..6a71026a0ff 100644
--- a/lib/Archive/ArchiveWriter.cpp
+++ b/lib/Archive/ArchiveWriter.cpp
@@ -212,7 +212,7 @@ Archive::writeMember(
sys::MappedFile* mFile = 0;
if (!data) {
mFile = new sys::MappedFile();
- if (mFile->open(member.getPath(), sys::MappedFile::READ_ACCESS, ErrMsg))
+ if (mFile->open(member.getPath(), ErrMsg))
return true;
if (!(data = (const char*) mFile->map(ErrMsg)))
return true;
@@ -411,7 +411,7 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
// Map in the archive we just wrote.
sys::MappedFile arch;
- if (arch.open(TmpArchive, sys::MappedFile::READ_ACCESS, ErrMsg))
+ if (arch.open(TmpArchive, ErrMsg))
return true;
const char* base;
if (!(base = (const char*) arch.map(ErrMsg)))