Index: test/tools/llvm-config/flush-stdout.test =================================================================== --- /dev/null +++ test/tools/llvm-config/flush-stdout.test @@ -0,0 +1,4 @@ +RUN: llvm-config --version | grep '\.' + +Test that stdout is flushed when llvm-config exits, so that the output can be +piped to other programs. Index: tools/llvm-config/llvm-config.cpp =================================================================== --- tools/llvm-config/llvm-config.cpp +++ tools/llvm-config/llvm-config.cpp @@ -606,5 +606,6 @@ usage(); } + OS.flush(); return 0; }