Changes in directory llvm/tools/llvm-ar:
llvm-ar.cpp updated: 1.36 -> 1.37 --- Log message: For PR797: http://llvm.org/PR797 : Remove exception handling from the bytecode archiver and adjust the llvm-ar tool to accommodate the new interfaces. --- Diffs of the changes: (+9 -5) llvm-ar.cpp | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) Index: llvm/tools/llvm-ar/llvm-ar.cpp diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.36 llvm/tools/llvm-ar/llvm-ar.cpp:1.37 --- llvm/tools/llvm-ar/llvm-ar.cpp:1.36 Wed Aug 23 01:56:27 2006 +++ llvm/tools/llvm-ar/llvm-ar.cpp Thu Aug 24 18:45:08 2006 @@ -586,7 +586,8 @@ // Append them quickly. for (std::set<sys::Path>::iterator PI = Paths.begin(), PE = Paths.end(); PI != PE; ++PI) { - TheArchive->addFileBefore(*PI,TheArchive->end()); + if (TheArchive->addFileBefore(*PI,TheArchive->end(),ErrMsg)) + return true; } // We're done editting, reconstruct the archive. @@ -647,15 +648,17 @@ sys::FileStatus si; std::string Err; if (found->getFileStatus(si, &Err)) - throw Err; + return true; if (si.isDir) { if (OnlyUpdate) { // Replace the item only if it is newer. if (si.modTime > I->getModTime()) - I->replaceWith(*found); + if (I->replaceWith(*found, ErrMsg)) + return true; } else { // Replace the item regardless of time stamp - I->replaceWith(*found); + if (I->replaceWith(*found, ErrMsg)) + return true; } } else { // We purposefully ignore directories. @@ -679,7 +682,8 @@ if (!remaining.empty()) { for (std::set<sys::Path>::iterator PI = remaining.begin(), PE = remaining.end(); PI != PE; ++PI) { - TheArchive->addFileBefore(*PI,insert_spot); + if (TheArchive->addFileBefore(*PI,insert_spot, ErrMsg)) + return true; } } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits