Fix returning error message in LLVMLinkModules
authorEli Bendersky <eliben@google.com>
Fri, 12 Jun 2015 23:26:42 +0000 (23:26 +0000)
committerEli Bendersky <eliben@google.com>
Fri, 12 Jun 2015 23:26:42 +0000 (23:26 +0000)
commit21a987d1ac00aa7100a7abd48896c944475775c7
tree243ddaf4f38bfefe51743d0c2b1149e9f4913f68
parent69fb65b52e5fe2cc4102a9d7a52b9ff9d977f1e1
Fix returning error message in LLVMLinkModules

On error, the temporary output stream wouldn't be flushed and therefore the
caller would see an empty error message.

Patch by Antoine Pitrou

Differential Revision: http://reviews.llvm.org/D10241

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239646 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/LinkModules.cpp
unittests/Linker/LinkModulesTest.cpp