[LLVMdev] .debug_info section size in arm executable

Devang Patel dpatel at apple.com
Wed Nov 9 10:57:15 PST 2011


On Nov 9, 2011, at 10:49 AM, Jim Grosbach wrote:

> 
> On Nov 9, 2011, at 10:43 AM, Eric Christopher wrote:
> 
>> 
>> On Nov 9, 2011, at 10:35 AM, Chris Lattner wrote:
>> 
>>> 
>>> On Nov 9, 2011, at 2:58 AM, Nick Lewycky wrote:
>>> 
>>>> 
>>>> For one example, for enums clang will emit the names for all of the enum 
>>>> cases. GCC only emits the ones that are used.
>>> 
>>> Is this a clang bug, or a feature?
>> 
>> IMO this is probably a feature. Thinking about it like this:
>> 
>> int foo(enum Bar x) {
>> 	switch(x)
>>          ...
>> }
>> 
>> int baz (int a)
>> {
>>   foo(a);
>> }
>> 
>> It's not good, but people do it. Also constructing enums via & and | etc. It'd be nice to be able to get the name of whatever it is that the code generator actually produced :)
>> 
> 
> Agreed. LLVM itself does this sort of thing pretty frequently, actually, and having the enum names and values available in the debugger is very nice.


+1

In addition, what's the expected size reduction in such cases to offset this inconvenience? Besides, is this an intentional gcc feature or accidental gcc behavior ?

-
Devang




More information about the llvm-dev mailing list