Page MenuHomePhabricator

Simplify ObjectFile::GetArchitecture

Authored by labath on Dec 28 2018, 5:31 AM.



instead of returning the architecture through by-ref argument and a
boolean value indicating success, we can just return the ArchSpec
directly. Since the ArchSpec already has an invalid state, it can be
used to denote the failure without the additional bool.

Diff Detail


Event Timeline

labath created this revision.Dec 28 2018, 5:31 AM
JDevlieghere accepted this revision.Jan 2 2019, 9:08 AM

Maybe add a unit test for the operator bool? Otherwise this LGTM.

This revision is now accepted and ready to land.Jan 2 2019, 9:08 AM
clayborg accepted this revision.Jan 2 2019, 9:45 AM
labath updated this revision to Diff 180008.Jan 3 2019, 2:40 AM

Add unit test for ArchSpec::operator bool

This revision was automatically updated to reflect the committed changes.