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? -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111109/01f7a2dd/attachment.html>
Chandler Carruth
2011-Nov-09 18:41 UTC
[LLVMdev] .debug_info section size in arm executable
On Wed, Nov 9, 2011 at 10:35 AM, Chris Lattner <clattner at apple.com> 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? >I've argued for enums, it's a feature. Nick is tracking other cases that are much more likely bugs. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111109/2515382a/attachment.html>
Eric Christopher
2011-Nov-09 18:43 UTC
[LLVMdev] .debug_info section size in arm executable
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 :) -eric -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111109/b77951ca/attachment.html>
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. -Jim
Possibly Parallel Threads
- [LLVMdev] .debug_info section size in arm executable
- [LLVMdev] .debug_info section size in arm executable
- [LLVMdev] .debug_info section size in arm executable
- [LLVMdev] .debug_info section size in arm executable
- [LLVMdev] .debug_info section size in arm executable