diff options
| author | James Y Knight <jyknight@google.com> | 2019-11-20 10:08:18 -0500 |
|---|---|---|
| committer | James Y Knight <jyknight@google.com> | 2019-11-21 10:55:03 -0500 |
| commit | d3fec7fb456138c83b84e38ce785ea6bfa59c30b (patch) | |
| tree | 0bb11c72231faf17331602bf5c5c3e7098cb9d59 /lld/Common/ErrorHandler.cpp | |
| parent | e8d1578131247d089209952476ba9191ad0295be (diff) | |
| download | bcm5719-llvm-d3fec7fb456138c83b84e38ce785ea6bfa59c30b.tar.gz bcm5719-llvm-d3fec7fb456138c83b84e38ce785ea6bfa59c30b.zip | |
LLD: Don't use the stderrOS stream in link before it's reassigned.
Remove the lld::enableColors function, as it just obscures which
stream it's affecting, and replace with explicit calls to the stream's
enable_colors.
Also, assign the stderrOS and stdoutOS globals first in link function,
just to ensure nothing might use them.
(Either change individually fixes the issue of using the old
stream, but both together seems best.)
Follow-up to b11386f9be9b2dc7276a758d64f66833da10bdea.
Differential Revision: https://reviews.llvm.org/D70492
Diffstat (limited to 'lld/Common/ErrorHandler.cpp')
| -rw-r--r-- | lld/Common/ErrorHandler.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lld/Common/ErrorHandler.cpp b/lld/Common/ErrorHandler.cpp index e26d78c2871..91ea6799907 100644 --- a/lld/Common/ErrorHandler.cpp +++ b/lld/Common/ErrorHandler.cpp @@ -51,8 +51,6 @@ ErrorHandler &lld::errorHandler() { return handler; } -void lld::enableColors(bool enable) { lld::errs().enable_colors(enable); } - void lld::exitLld(int val) { // Delete any temporary file, while keeping the memory mapping open. if (errorHandler().outputBuffer) |

