From: Davide Italiano Date: Sat, 14 Nov 2015 18:33:47 +0000 (+0000) Subject: [llvm-ar] Use fail() helper to reduce duplication. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=8baf5a3c9207bd433424cfc4e4f1cb89bd8ad30c;ds=sidebyside [llvm-ar] Use fail() helper to reduce duplication. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253139 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp index cac46d2e50b..d60a1e2cf4a 100644 --- a/tools/llvm-ar/llvm-ar.cpp +++ b/tools/llvm-ar/llvm-ar.cpp @@ -390,10 +390,8 @@ static bool shouldCreateArchive(ArchiveOperation Op) { 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()) {