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; }