diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-12-15 21:58:03 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-12-15 21:58:03 +0000 |
commit | b4ed7b0f809a4023a0e9f80f4530d59d357dc5ef (patch) | |
tree | 1d047f06c3607814f13329c096fe0939c8341ff0 /tools/llvm-ar | |
parent | 56998b26aee585b06c7990f7a89d4d1bd3804df4 (diff) | |
download | external_llvm-b4ed7b0f809a4023a0e9f80f4530d59d357dc5ef.zip external_llvm-b4ed7b0f809a4023a0e9f80f4530d59d357dc5ef.tar.gz external_llvm-b4ed7b0f809a4023a0e9f80f4530d59d357dc5ef.tar.bz2 |
Unbreak all archive reading operations introduced by the last patch which
always exited the program with exit code 1 in these cases, regardless of
whether an error occurred or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ar')
-rw-r--r-- | tools/llvm-ar/llvm-ar.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp index 586639b..1755e18 100644 --- a/tools/llvm-ar/llvm-ar.cpp +++ b/tools/llvm-ar/llvm-ar.cpp @@ -679,10 +679,11 @@ int main(int argc, char **argv) { } else { std::string Error; TheArchive = Archive::OpenAndLoad(ArchivePath, &Error); - if (TheArchive == 0) + if (TheArchive == 0) { std::cerr << argv[0] << ": error loading '" << ArchivePath << "': " << Error << "!\n"; - return 1; + return 1; + } } // Make sure we're not fooling ourselves. |