Add MCSymbolCOFF

Rafael Espíndola rafael.espindola at gmail.com
Sat Jun 6 14:47:16 PDT 2015


Patches 3, 4 and 5 are fine.

On Patch 6

+  /// MachOSymbolFlags - We store the value for the 'desc' symbol field in the

Don't repeat names in comments.

It should delete MCMachOSymbolFlags.h or use it. Don't copy the values.

Why is the common symbol handling that it removes a nop?

Cheers,
Rafael




On 5 June 2015 at 22:03, Pete Cooper <peter_cooper at apple.com> wrote:
> Here’s the full set of patches I have so far.  The next step will be to change Flags to uint16_t to pack MCSymbol better.  I’ll get to that next week.
>
> Cheers,
> Pete
>
>
>
>> On Jun 5, 2015, at 4:39 PM, 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
>>
>> <0001-Change-MCSymbol-IsELF-to-an-enum-to-support-future-M.patch><0002-Add-MCSymbolCOFF-class-and-use-it-to-get-and-set-the.patch>
>
>




More information about the llvm-commits mailing list