Page MenuHomePhabricator

Simplify ObjectFile::GetArchitecture
ClosedPublic

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

Details

Summary

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

Repository
rLLDB LLDB

Event Timeline

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

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

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

Add unit test for ArchSpec::operator bool

This revision was automatically updated to reflect the committed changes.