[llvm-objdump] Simplify reportError() and prepend outs().flush()
authorFangrui Song <maskray@google.com>
Sun, 31 May 2020 00:25:18 +0000 (17:25 -0700)
committerFangrui Song <maskray@google.com>
Sun, 31 May 2020 00:25:59 +0000 (17:25 -0700)
commita23d1e9aff4d8cb752e227b3e16f887cf49c15d4
treebc7ab2471608e92da7425f52e3f4bdcccd50afbb
parent07e8a780d81bb58a0c7bd4da6cc0b9beaec3c788
[llvm-objdump] Simplify reportError() and prepend outs().flush()

As noticed by dblaikie.

I don't know what code paths using reportError can cause stdout output
to be interleaved with stderr, so no test is added now.

Also drop an unneeded use of errs().fflush() in reportWarning().
I requested this in D64165.
llvm/tools/llvm-objdump/llvm-objdump.cpp