This is an archive of the discontinued LLVM Phabricator instance.

[LLD] COFF: Make DefinedCOFF one pointer smaller
ClosedPublic

Authored by ruiu on Jun 29 2015, 3:38 PM.

Details

Reviewers
majnemer
Summary

COFFSymbolRef is a container type for coff_symbol16 and coff_symbol32.
The difference between 16 and 32 matters only for SectionNumber, Type,
StorageClass and NumberOfAuxSymbols. Name and Value fields are at
the same offsets. So we don't need to distinguish them.

Diff Detail

Event Timeline

ruiu updated this revision to Diff 28720.Jun 29 2015, 3:38 PM
ruiu retitled this revision from to [LLD] COFF: Make DefinedCOFF one pointer smaller.
ruiu updated this object.
ruiu edited the test plan for this revision. (Show Details)
ruiu added a reviewer: chandlerc.
ruiu added a subscriber: Unknown Object (MLST).

I think it would be safer to create a coff_symbol_generic which only contains the fields that coff_symbol16 and coff_symbol32 have in common. This way, we wouldn't accidentally assume we could use the other fields.

chandlerc edited reviewers, added: majnemer; removed: chandlerc.Jun 29 2015, 4:17 PM
chandlerc added a subscriber: chandlerc.

Deferring to David here, he's more familiar with the libObject side of things.

majnemer accepted this revision.Jun 29 2015, 4:56 PM
majnemer edited edge metadata.

Thanks! LGTM.

This revision is now accepted and ready to land.Jun 29 2015, 4:56 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r241025.