Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Workaround for --help output being truncated when redirecting to file.

  • Loading branch information...
commit 0777102e9dfd50bd757b71e35263d72c0727fc8d 1 parent 9c3bb1e
@klickverbot klickverbot authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 driver/main.cpp
View
5 driver/main.cpp
@@ -96,6 +96,11 @@ void printVersion() {
if (CPU == "generic") CPU = "(unknown)";
printf(" Host CPU: %s\n", CPU.c_str());
printf("\n");
+
+ // Without explicitly flushing here, only the target list is visible when
+ // redirecting stdout to a file.
+ fflush(stdout);
+
llvm::TargetRegistry::printRegisteredTargetsForVersion();
exit(EXIT_SUCCESS);
}
Please sign in to comment.
Something went wrong with that request. Please try again.