[llvm] r253139 - [llvm-ar] Use fail() helper to reduce duplication.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 14 10:33:48 PST 2015
Author: davide
Date: Sat Nov 14 12:33:47 2015
New Revision: 253139
URL: http://llvm.org/viewvc/llvm-project?rev=253139&view=rev
Log:
[llvm-ar] Use fail() helper to reduce duplication.
Modified:
llvm/trunk/tools/llvm-ar/llvm-ar.cpp
Modified: llvm/trunk/tools/llvm-ar/llvm-ar.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/llvm-ar.cpp?rev=253139&r1=253138&r2=253139&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/llvm-ar.cpp (original)
+++ llvm/trunk/tools/llvm-ar/llvm-ar.cpp Sat Nov 14 12:33:47 2015
@@ -390,10 +390,8 @@ static bool shouldCreateArchive(ArchiveO
static void performReadOperation(ArchiveOperation Operation,
object::Archive *OldArchive) {
- if (Operation == Extract && OldArchive->isThin()) {
- errs() << "extracting from a thin archive is not supported\n";
- std::exit(1);
- }
+ if (Operation == Extract && OldArchive->isThin())
+ fail("extracting from a thin archive is not supported");
bool Filter = !Members.empty();
for (auto &ChildOrErr : OldArchive->children()) {
More information about the llvm-commits
mailing list