[cfe-commits] r150199 - in /cfe/trunk: include/clang/AST/ASTDiagnostic.h include/clang/Analysis/AnalysisDiagnostic.h include/clang/Basic/Diagnostic.td include/clang/Basic/DiagnosticIDs.h include/clang/Driver/DriverDiagnostic.h include/clang/Front

David Blaikie dblaikie at gmail.com
Sun Feb 12 17:05:55 PST 2012


On Thu, Feb 9, 2012 at 9:22 PM, David Blaikie <dblaikie at gmail.com> wrote:
> On Thu, Feb 9, 2012 at 8:33 PM, Chris Lattner <clattner at apple.com> wrote:
>> On Feb 9, 2012, at 2:55 PM, David Blaikie wrote:
>>> Here's a similar change to remove the diagnostic name from the main
>>> table. It does mean removing a current clang flag, but I can't see a
>>> particular use-case for this flag (& it was added in the same change
>>> that originally added the two extra fields Benjamin just removed - so
>>> I believe it's similarly unfinished work that never panned out)
>>>
>>> "Remove the unuseful -fdiagnostics-show-name
>>
>> I can't think of any useful purpose for this flag either.  Does diagtool use it?
>
> Nope, though Diagtool does use the extra internal table
> (StaticDiagNameIndex) of <name, diagid> - that was the other thing I
> was going to fix (& I've done so) so here's a patch that includes both
> the previous patch & the removal of StaticDiagNameIndex (or I should
> say /moving/ since it now lives wholely in DiagTool that still needs
> those name strings). There's a few things that could be tidied up
> (this change means that ListWarnings.cpp in DiagTool has to do some of
> the same work as DiagnosticIDs.cpp such as including all the
> diagnostic tblgen'd headers (this could be added to a shared header)
> and I copy/pasted the string size macro over there too (could be added
> to the same header)) but it shows the principle
>
> It also brings Diagnostics.o to 430K (from 714K on my machine - not
> the 697 you saw (on macos presumably, I'm on ubuntu Linux)) and brings
> Clang's executable down by 0.5% (from 29.885M to 29.736M)

Bump & now with documentation updates.

>
> - David
>
>> Ted, do you know if there are any clients of this?
>>
>> -Chris
>>
>>>
>>> This option was added in r129614 and doesn't have any use case that I'm aware
>>> of. It's possible that external tools are using these names - and if that's
>>> the case we can certainly reassess the functionality, but for now it lets us
>>> shave out a few unneeded bits from clang.
>>>
>>> In a follow up change I'll see about removing the "StaticDiagNameIndex" table
>>> as well which should remove the actual diagnostic name strings from clang
>>> entirely - though it'll mean moving that table into diagtool which still needs
>>> access to the string names to print its own results."
>>>
>>> On Thu, Feb 9, 2012 at 11:55 AM, Chris Lattner <clattner at apple.com> wrote:
>>>>
>>>> On Feb 9, 2012, at 11:38 AM, Benjamin Kramer wrote:
>>>>
>>>>> Author: d0k
>>>>> Date: Thu Feb  9 13:38:26 2012
>>>>> New Revision: 150199
>>>>>
>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=150199&view=rev
>>>>> Log:
>>>>> Kill the brief and full explanation fields from StaticDiagInfoRec. They were unused and wasted space for nothing.
>>>>>
>>>>> - per PR11952.
>>>>
>>>> Nice, this shrinks DiagnosticIDs.o from 809K to 697K!
>>>>
>>>> -Chris
>>>> _______________________________________________
>>>> cfe-commits mailing list
>>>> cfe-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>> <diag_opt_size.diff>
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diag_size_opt.diff
Type: application/octet-stream
Size: 17683 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120212/84c5660d/attachment.obj>


More information about the cfe-commits mailing list