summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ar/llvm-ar.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-09-07 23:30:48 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-09-07 23:30:48 +0000
commit39c150eecbc1cf83836c59a516ee9aa1795a189c (patch)
treec7143559b7d4b1446f922dc039f5a9dcb23ae2d2 /llvm/tools/llvm-ar/llvm-ar.cpp
parent975293f0e593761a5d2d4446463fecd14b425aff (diff)
downloadbcm5719-llvm-39c150eecbc1cf83836c59a516ee9aa1795a189c.tar.gz
bcm5719-llvm-39c150eecbc1cf83836c59a516ee9aa1795a189c.zip
Don't call exit from cl::PrintHelpMessage.
Most callers were not expecting the exit(0) and trying to exit with a different value. This also adds back the call to cl::PrintHelpMessage in llvm-ar. llvm-svn: 312761
Diffstat (limited to 'llvm/tools/llvm-ar/llvm-ar.cpp')
-rw-r--r--llvm/tools/llvm-ar/llvm-ar.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp
index 65c61989282..03655cb4318 100644
--- a/llvm/tools/llvm-ar/llvm-ar.cpp
+++ b/llvm/tools/llvm-ar/llvm-ar.cpp
@@ -54,8 +54,7 @@ static StringRef ToolName;
// Show the error message and exit.
LLVM_ATTRIBUTE_NORETURN static void fail(Twine Error) {
errs() << ToolName << ": " << Error << ".\n";
- // FIXME: Other ar implementations will print the command line help in here.
- // Unfortunately cl::PrintHelpMessage() exits with 0, so we can't call it.
+ cl::PrintHelpMessage();
exit(1);
}
OpenPOWER on IntegriCloud