From: Rui Ueyama Date: Fri, 11 Nov 2016 02:16:15 +0000 (+0000) Subject: Call flush() after llvm_shutdown(). X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=169e7c4edc1b5273965341e9961cccf914a4673b;p=platform%2Fupstream%2Fllvm.git Call flush() after llvm_shutdown(). llvm_shutdown could write something to outs or errs, so we need to flush them after calling llvm_shutdown. llvm-svn: 286548 --- diff --git a/lld/ELF/Error.cpp b/lld/ELF/Error.cpp index 87d633b..d56229d 100644 --- a/lld/ELF/Error.cpp +++ b/lld/ELF/Error.cpp @@ -49,14 +49,13 @@ void elf::error(std::error_code EC, const Twine &Prefix) { } void elf::exitLld(int Val) { - outs().flush(); - errs().flush(); - // Dealloc/destroy ManagedStatic variables before calling // _exit(). In a non-LTO build, this is a nop. In an LTO // build allows us to get the output of -time-passes. llvm_shutdown(); + outs().flush(); + errs().flush(); _exit(Val); }