For PR797:

Remove exception handling from the bytecode archiver and adjust the llvm-ar
tool to accommodate the new interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29866 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2006-08-24 23:45:08 +00:00
parent c82b3aab65
commit 0ff2d31766
8 changed files with 156 additions and 128 deletions
+6 -2
View File
@@ -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();