diff options
-rw-r--r-- | lld/ELF/Error.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/Error.cpp b/lld/ELF/Error.cpp index 87d633b362a..d56229d529f 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); } |