This is an archive of the discontinued LLVM Phabricator instance.

Object/COFF: Define coff_symbol_generic
ClosedPublic

Authored by ruiu on Jun 29 2015, 4:02 PM.

Details

Reviewers
majnemer
Summary

If you need only Name and Value fields in a COFF symbol,
this data structure is one pointer smaller (or half of) COFFSymbolRef.
I'll use this class in LLD because we create millions of instances
for symbols read from the symbol table, and the size of the symbol
reference actually matters.

Diff Detail

Event Timeline

ruiu updated this revision to Diff 28721.Jun 29 2015, 4:02 PM
ruiu retitled this revision from to Object/COFF: Define coff_symbol_generic.
ruiu updated this object.
ruiu edited the test plan for this revision. (Show Details)
ruiu added a reviewer: majnemer.
ruiu added subscribers: chandlerc, Unknown Object (MLST).
majnemer added inline comments.Jun 29 2015, 4:40 PM
lib/Object/COFFObjectFile.cpp
871–872

I think it would make more sense to change the original getSymbolName implementation's Symbol to coff_symbol_generic and then have an overload for COFFSymbolRef.

ruiu updated this revision to Diff 28733.Jun 29 2015, 4:53 PM

Updated as per David's comment.

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

Perfect, LGTM.

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

Committed in r241024.