Add MCSymbolCOFF

Rafael Espíndola rafael.espindola at gmail.com
Sat Jun 6 10:29:46 PDT 2015


On 5 June 2015 at 19:39, Pete Cooper <peter_cooper at apple.com> wrote:
> Hey Rafael
>
> This is ultimately part of an effort to reduce the size of MCSymbol even further.
>
> One of the problematic fields is MCSymbol::Flags which needs to be a uint16_t on MachO and ELF but uint32_t on COFF.
>
> These patches create a MCSymbolCOFF class which for now is just used to hide the flags code for the type field of an encoded COFF symbol.  I’ll later move the type itself out of the uint32_t flags in MCSymbol and reduce that to a uint16_t.
>
> I’m also going to create an MCSymbolMachO which will really just be used to contain all the flags logic.  I’d like to make setFlags, getFlags, and modifyFlags all be protected and actually handle the flags in the subclasses.  You already did all of this for ELF, but i’ll do MachO and COFF.

Nice. Having a more direct API will be a nice improvement.

The 0001 patch is OK, I will soon take a look at the others.

Cheers,
Rafael




More information about the llvm-commits mailing list