[PATCH] D26865: [ELF] - exit on --version call

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 11:25:39 PST 2016


grimar created this revision.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar, evgeny777.

Sorry for posting such a minor one
, but just found I am not sure this is
expected behaviour though it seems so according to
https://llvm.org/bugs/show_bug.cgi?id=31057.

So do we want that one right ?


https://reviews.llvm.org/D26865

Files:
  ELF/Driver.cpp


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.78560.patch
Type: text/x-patch
Size: 464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161118/9f5ebf5b/attachment.bin>


More information about the llvm-commits mailing list