Add MCSymbolCOFF

Pete Cooper peter_cooper at apple.com
Fri Jun 5 16:39:16 PDT 2015


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Change-MCSymbol-IsELF-to-an-enum-to-support-future-M.patch
Type: application/octet-stream
Size: 3486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150605/3d28317f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-MCSymbolCOFF-class-and-use-it-to-get-and-set-the.patch
Type: application/octet-stream
Size: 5601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150605/3d28317f/attachment-0001.obj>


More information about the llvm-commits mailing list