Add MCSymbolCOFF

Pete Cooper peter_cooper at apple.com
Sat Jun 6 19:14:37 PDT 2015


> On Jun 6, 2015, at 1:13 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> 
> On patch 2,
> 
> include/llvm/MC/MCSymbolCOFF.h needs to include
> include/llvm/Support/COFF.h for SF_TypeShift, no?
> 
> LGTM with that.
Good point.  I missed that.  I later move the enum over, but good to have that patch be complete.

Thanks for the reviews so far.  I know this was a whole bunch of patches to land on you all at once.

Cheers,
Pete
> 
> Cheers,
> Rafael
> 
> 
> 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.
>> 
>> Cheers,
>> Pete
>> 





More information about the llvm-commits mailing list