3 Commits

Author SHA1 Message Date
Jonas Devlieghere
5365e8b418 [Support] Extend WithColor helpers
Although printing warnings and errors to stderr is by far the most
common case, this patch makes it possible to specify any stream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330094 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-15 08:44:15 +00:00
Jonas Devlieghere
5baab4c85c [Support] Add convenience functions to WithColor. NFC.
Create convenience functions for printing error, warning and note to
stdout. Previously we had similar functions being used in dsymutil, but
given that this pattern is so common it makes sense to make it available
globally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330091 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-14 21:36:42 +00:00
Jonas Devlieghere
01d72e5767 [Support] Move syntax highlighting into support
Move the DWARF syntax highlighting into support. This has several
advantages, most notably that this makes the WithColor RAII wrapper
available outside libDebugInfo. Furthermore, several projects all have
their own code for handling colored output. This provides a place to
centralize it.

Differential revision: https://reviews.llvm.org/D44215

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327108 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-09 09:56:24 +00:00