[PATCH] D33981: Only print registered targets for `--version`
Dimitry Andric via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 7 04:23:28 PDT 2017
dim created this revision.
In https://reviews.llvm.org/D33900, I added printing of the registered targets in clang's
`PrintVersion` function, which is not only used for `--version` output,
but also for `-v` (verbose mode) and `-###`. Especially the latter
seems to trip up some test cases, so it is probably better to only print
the registered targets for `--version`.
https://reviews.llvm.org/D33981
Files:
lib/Driver/Driver.cpp
Index: lib/Driver/Driver.cpp
===================================================================
--- lib/Driver/Driver.cpp
+++ 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.101690.patch
Type: text/x-patch
Size: 809 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170607/b2442849/attachment.bin>
More information about the cfe-commits
mailing list