mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
For PR797:
Adjust to new interface for MappedFile. Note that the new "throw" statements will be removed later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29818 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -137,8 +137,12 @@ Archive::Archive(const sys::Path& filename, bool map )
|
||||
symTabSize(0), firstFileOffset(0), modules(), foreignST(0)
|
||||
{
|
||||
if (map) {
|
||||
mapfile = new sys::MappedFile(filename);
|
||||
base = (char*) mapfile->map();
|
||||
std::string ErrMsg;
|
||||
mapfile = new sys::MappedFile();
|
||||
if (mapfile->open(filename, sys::MappedFile::READ_ACCESS, &ErrMsg))
|
||||
throw ErrMsg;
|
||||
if (!(base = (char*) mapfile->map(&ErrMsg)))
|
||||
throw ErrMsg;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user