[PATCH] D33981: Only print registered targets for `--version`

Dimitry Andric via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 05:06:07 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL304899: Only print registered targets for `--version` (authored by dim).

Changed prior to commit:
  https://reviews.llvm.org/D33981?vs=101690&id=101697#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D33981

Files:
  cfe/trunk/lib/Driver/Driver.cpp


Index: cfe/trunk/lib/Driver/Driver.cpp
===================================================================
--- cfe/trunk/lib/Driver/Driver.cpp
+++ cfe/trunk/lib/Driver/Driver.cpp
@@ -1117,10 +1117,6 @@
 
   // Print out the install directory.
   OS << "InstalledDir: " << InstalledDir << '\n';
-
-  // Print registered targets.
-  OS << '\n';
-  llvm::TargetRegistry::printRegisteredTargetsForVersion(OS);
 }
 
 /// PrintDiagnosticCategories - Implement the --print-diagnostic-categories
@@ -1166,6 +1162,10 @@
   if (C.getArgs().hasArg(options::OPT__version)) {
     // Follow gcc behavior and use stdout for --version and stderr for -v.
     PrintVersion(C, llvm::outs());
+
+    // Print registered targets.
+    llvm::outs() << '\n';
+    llvm::TargetRegistry::printRegisteredTargetsForVersion(llvm::outs());
     return false;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33981.101697.patch
Type: text/x-patch
Size: 839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170607/96b6a8cf/attachment.bin>


More information about the cfe-commits mailing list