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/include | |
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/include')
-rw-r--r-- | lld/include/lld/Common/ErrorHandler.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lld/include/lld/Common/ErrorHandler.h b/lld/include/lld/Common/ErrorHandler.h index ac6f93fc088..8eed38af8c8 100644 --- a/lld/include/lld/Common/ErrorHandler.h +++ b/lld/include/lld/Common/ErrorHandler.h @@ -117,8 +117,6 @@ private: /// Returns the default error handler. ErrorHandler &errorHandler(); -void enableColors(bool enable); - inline void error(const Twine &msg) { errorHandler().error(msg); } inline LLVM_ATTRIBUTE_NORETURN void fatal(const Twine &msg) { errorHandler().fatal(msg); |