diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-08-24 23:45:08 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-08-24 23:45:08 +0000 |
commit | ec0f205dc12474068ced7cdb6b197106a634989d (patch) | |
tree | db93dba155239014ec194701fa940af7cd435418 /llvm/lib/Bytecode/Archive/ArchiveReader.cpp | |
parent | 24d4208c97a78c701f50ef03cdc0c6d230cdb41a (diff) | |
download | bcm5719-llvm-ec0f205dc12474068ced7cdb6b197106a634989d.tar.gz bcm5719-llvm-ec0f205dc12474068ced7cdb6b197106a634989d.zip |
For PR797:
Remove exception handling from the bytecode archiver and adjust the llvm-ar
tool to accommodate the new interfaces.
llvm-svn: 29866
Diffstat (limited to 'llvm/lib/Bytecode/Archive/ArchiveReader.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Archive/ArchiveReader.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Bytecode/Archive/ArchiveReader.cpp b/llvm/lib/Bytecode/Archive/ArchiveReader.cpp index c8dd17c8f11..38aa07243c7 100644 --- a/llvm/lib/Bytecode/Archive/ArchiveReader.cpp +++ b/llvm/lib/Bytecode/Archive/ArchiveReader.cpp @@ -330,7 +330,9 @@ Archive::loadArchive(std::string* error) { Archive* Archive::OpenAndLoad(const sys::Path& file, std::string* ErrorMessage) { - std::auto_ptr<Archive> result ( new Archive(file, true)); + std::auto_ptr<Archive> result ( new Archive(file)); + if (result->mapToMemory(ErrorMessage)) + return 0; if (!result->loadArchive(ErrorMessage)) return 0; return result.release(); @@ -437,7 +439,9 @@ Archive::loadSymbolTable(std::string* ErrorMsg) { // Open the archive and load just the symbol tables Archive* Archive::OpenAndLoadSymbols(const sys::Path& file, std::string* ErrorMessage) { - std::auto_ptr<Archive> result ( new Archive(file, true) ); + std::auto_ptr<Archive> result ( new Archive(file) ); + if (result->mapToMemory(ErrorMessage)) + return 0; if (!result->loadSymbolTable(ErrorMessage)) return 0; return result.release(); |