[PATCH] Colored syntax highlighting for llvm-dwarfdump.

Eric Christopher echristo at gmail.com
Mon Jan 5 16:09:03 PST 2015


On Mon Jan 05 2015 at 4:06:31 PM Adrian Prantl <aprantl at apple.com> wrote:

> In http://reviews.llvm.org/D6852#105642, @echristo wrote:
>
> > Definitely want it.
> >
> > Two things:
> >
> > a) Might want to make it an option?
>
>
> With this implementation colorizing is depending on the terminal type:
> Invoking llvm-dwarfdump results in color output, whereas llvm-dwarfdump |
> less will be monochrome.
> The frontend provides an -fdiagnostics-color option that is on by default.
> We could do something similar here; If we do this; it should override the
> terminal detection, such that llvm-dwarfdump --color | less produces color
> output no matter what.
>
>
:) This is what I'd like personally.


> > b) Formatting for the SyntaxHighlighting.h file.
>
> >
>
> > Is there any way we can piggy back more off the existing color support?
> (Not that this is complicated and I've not looked at it at all)
>
>
> Is there more/better color support somewhere that we could re-use? I only
> looked at the AST dumper in clang so far, which just hardcodes the colors.
>
>
I just figured having one unified "put some color on it" type of interface.
It's not necessary, I was just curious.

-eric


>
> REPOSITORY
>   rL LLVM
>
> http://reviews.llvm.org/D6852
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150106/d0a106a0/attachment.html>


More information about the llvm-commits mailing list