[LLD] Avoid exiting with a locked mutex NFC
authorAndrew Ng <andrew.ng@sony.com>
Wed, 22 Jan 2020 17:08:09 +0000 (17:08 +0000)
committerAndrew Ng <andrew.ng@sony.com>
Tue, 28 Jan 2020 16:44:44 +0000 (16:44 +0000)
commitde2dfc8b203f0ff903e401acf7cc55552e63a2fd
tree345a668337f533485f57e2ac176671229ffa199f
parentf117f2cc7837fbca75bf97fcca2a55423f3023ca
[LLD] Avoid exiting with a locked mutex NFC

In ErrorHandler::error(), rearrange code to avoid calling exitLld with
the mutex locked. Acquire mutex lock when flushing the output streams in
exitLld.

Differential Revision: https://reviews.llvm.org/D73281
lld/Common/ErrorHandler.cpp