diff options
author | Rui Ueyama <ruiu@google.com> | 2019-08-02 07:22:34 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2019-08-02 07:22:34 +0000 |
commit | 48413f2c2f7ae3107687af7b86f7bc50385a7695 (patch) | |
tree | 6db11da1d95890a93b26229346faed6feb828d18 /include/lld | |
parent | 0213aa993105c32b91ec484276e366238559c112 (diff) |
Revert r367649: Improve raw_ostream so that you can "write" colors using operator<<
This reverts commit r367649 in an attempt to unbreak Windows bots.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@367658 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/lld')
-rw-r--r-- | include/lld/Common/ErrorHandler.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/lld/Common/ErrorHandler.h b/include/lld/Common/ErrorHandler.h index 3c6ea9732..52e22001f 100644 --- a/include/lld/Common/ErrorHandler.h +++ b/include/lld/Common/ErrorHandler.h @@ -87,6 +87,7 @@ public: StringRef errorLimitExceededMsg = "too many errors emitted, stopping now"; StringRef logName = "lld"; llvm::raw_ostream *errorOS = &llvm::errs(); + bool colorDiagnostics = llvm::errs().has_colors(); bool exitEarly = true; bool fatalWarnings = false; bool verbose = false; @@ -101,9 +102,9 @@ public: std::unique_ptr<llvm::FileOutputBuffer> outputBuffer; private: - using Color = raw_ostream::Color; - - std::string getLocation(const Twine &msg); + void printHeader(StringRef s, raw_ostream::Colors c, const Twine &msg); + void printErrorMsg(const Twine &msg); + void printError(const Twine &msg); }; /// Returns the default error handler. |