[PATCH] D29970: opt-viewer: abbreviate long function names

Brian Cain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 15 06:28:00 PST 2017


bcain added a comment.

In https://reviews.llvm.org/D29970#677135, @anemet wrote:

> > The background color of all references whether abbreviated or not is changed. The existing style.css was used and this is the style it already specified for items having a tooltip. If appropriate, we can change the tooltip decoration to only apply when abbreviated, and perhaps change the style to no longer modify the background color.
>
> So my immediate reaction is that we shouldn't be changing the background color but I haven't seen the interface so it may make sense.  What do you think?
>
> Also I would think that '...' provides sufficient clue that the function is abbreviated without color coding but as I said it's hard to judge without looking at this.  I am fine if you check in the color part as is and then I can take a look.


Agreed.  I wanted to start this patch with the smallest possible change to the style.css and that's what it had already specified for the tooltip style.  I'll remove the "background-color" attribute for .tooltip.



================
Comment at: utils/opt-viewer/opt-viewer.py:116-117
 
         if key == 'Caller' or key == 'Callee':
             value = cgi.escape(demangle(value))
 
----------------
anemet wrote:
> > This will only change index and the source render's "Inline Context" column. Unfortunately, references to very long function names in remarks are not affected by this change.
> 
> If you abbreviated here too, I think that would do it, no?
But it would abbreviate the entire comment, regardless of the presence/absence of a long function name.  Is that still what we want here?


https://reviews.llvm.org/D29970





More information about the llvm-commits mailing list