[PATCH] Fixup T_U_D reading

Richard Henderson rth@redhat.com
Fri Sep 17 21:31:00 GMT 2010


On 09/17/2010 07:32 AM, Richard Guenther wrote:
> On Fri, 17 Sep 2010, Jakub Jelinek wrote:
> 
>> On Fri, Sep 17, 2010 at 04:20:33PM +0200, Richard Guenther wrote:
>>>>>  {
>>>>> -  TRANSLATION_UNIT_LANGUAGE (expr) = input_string (data_in, ib);
>>>>> +  TRANSLATION_UNIT_LANGUAGE (expr) = xstrdup (input_string (data_in, ib));
>>>>>   VEC_safe_push (tree, gc, all_translation_units, expr);
>>>>>  }
>>>>
>>>> I guess it's not worth sharing the language strings somehow??
>>>
>>> Well, it's going to be O(number of TUs) strings, so - no.  It might
>>> be worth transitioning LANG_NAME from a string to an enum maybe ;)
>>
>> Perhaps putting there not a const char *, but IDENTIFIER and use
>> get_identifier ("GNU C") etc.?
> 
> Well, as I said, if changing anything changing it to an enum makes
> more sense than trying to save a few bytes via string sharing
> (in fact LANG_NAME is also not an identifier).

For the enum, use DW_LANG_* ?


r~



More information about the Gcc-patches mailing list