[PATCH] D26865: [ELF] - exit on --version call
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 18 12:47:09 PST 2016
grimar updated this revision to Diff 78571.
grimar added a comment.
- Updated test.
https://reviews.llvm.org/D26865
Files:
ELF/Driver.cpp
test/ELF/driver.test
Index: test/ELF/driver.test
===================================================================
--- test/ELF/driver.test
+++ test/ELF/driver.test
@@ -16,7 +16,7 @@
# RUN: ld.lld --help 2>&1 | FileCheck -check-prefix=HELP %s
# HELP: USAGE:
-# RUN: not ld.lld --version 2>&1 | FileCheck -check-prefix=VERSION %s
+# RUN: ld.lld --version 2>&1 | FileCheck -check-prefix=VERSION %s
# VERSION: LLD
## Attempt to link DSO with -r
Index: ELF/Driver.cpp
===================================================================
--- ELF/Driver.cpp
+++ ELF/Driver.cpp
@@ -290,8 +290,10 @@
printHelp(ArgsArr[0]);
return;
}
- if (Args.hasArg(OPT_version))
+ if (Args.hasArg(OPT_version)) {
outs() << getLLDVersion() << "\n";
+ exitLld(0);
+ }
Config->ExitEarly = CanExitEarly && !Args.hasArg(OPT_full_shutdown);
if (const char *Path = getReproduceOption(Args)) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26865.78571.patch
Type: text/x-patch
Size: 884 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161118/8a8203c2/attachment.bin>
More information about the llvm-commits
mailing list