[PATCH] D17879: [ELF] - Simplify a SymbolBody interface a bit.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 4 05:39:58 PST 2016


maybe just wait and see the bug Davide was referring to in the other
patch? (some symbols not getting a STT_OBJECT).

Cheers,
Rafael


On 4 March 2016 at 04:56, George Rimar <grimar at accesssoftek.com> wrote:
> grimar created this revision.
> grimar added reviewers: davide, emaste, rafael, ruiu.
> grimar added subscribers: llvm-commits, grimar.
>
> I think we can get rid of few accessors in that class, and replace
> them with direct field access.
>
> Positive features from that are (just an IMHO of course):
> * Use of direct fields instead of accessor is more readable as you can never know the exact logic of accessor when looking on it (will it just return the pre-ready result or has some condition).
> * Code generally is a bit shorter (please refer to the patch code).
> * Less methods in interfaces.
> * Currently 2 bitfields *probably* consume less memory than single int8 (that depends on structures aligment I think and I did not look close on difference for this patch). Also looks like we will not need any other flags, but even if we will, I think 1-2 new bitfields is probably more preferable than 1-2 new methods because of profits mentioned above.
>
> http://reviews.llvm.org/D17879
>
> Files:
>   ELF/InputSection.cpp
>   ELF/OutputSections.cpp
>   ELF/SymbolTable.cpp
>   ELF/Symbols.cpp
>   ELF/Symbols.h
>   ELF/Target.cpp
>   ELF/Writer.cpp
>


More information about the llvm-commits mailing list