Page MenuHomePhabricator

Object: Simplify the IRObjectFile symbol iterator implementation.

Authored by pcc on Nov 21 2016, 12:57 PM.



Change the IRObjectFile symbol iterator to be a pointer into a vector of
PointerUnions representing either IR symbols or asm symbols. While at it,
teach IRObjectFile to handle ifuncs.

This change is in preparation for a future change for supporting multiple
modules in an IRObjectFile. Although it causes an increase in memory
consumption, we can deal with that issue separately by introducing a bitcode
symbol table.

Diff Detail


Event Timeline

pcc updated this revision to Diff 78763.Nov 21 2016, 12:57 PM
pcc updated this revision to Diff 78765.
pcc retitled this revision from to Object: Simplify the IRObjectFile symbol iterator implementation..
pcc updated this object.
pcc added a reviewer: mehdi_amini.
pcc added subscribers: llvm-commits, rafael.

Add test

pcc updated this revision to Diff 79154.Nov 23 2016, 2:46 PM
  • Remove ifunc support
mehdi_amini accepted this revision.Nov 23 2016, 4:34 PM
mehdi_amini edited edge metadata.


32 ↗(On Diff #79154)

I haven't tracked how the AsmSymbol are passed in, but couldn't we keep a StringRef instead of a std::string?
(I know it is not directly related to your patch)

This revision is now accepted and ready to land.Nov 23 2016, 4:34 PM
pcc added inline comments.Nov 23 2016, 4:49 PM
32 ↗(On Diff #79154)

These strings are owned by the StringMap in RecordStreamer, so we can't.

This revision was automatically updated to reflect the committed changes.