forked from OSchip/llvm-project
Only print registered targets for `--version`
Summary: In 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`. Reviewers: nemanjai, mehdi_amini Reviewed By: nemanjai Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33981 llvm-svn: 304899
This commit is contained in:
parent
0196427b03
commit
0527c32be8
|
@ -1117,10 +1117,6 @@ void Driver::PrintVersion(const Compilation &C, raw_ostream &OS) const {
|
|||
|
||||
// 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 @@ bool Driver::HandleImmediateArgs(const Compilation &C) {
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue