This is an archive of the discontinued LLVM Phabricator instance.

Add `Operation* OpState::operator->()` to provide more convenient access to members of Operation.
ClosedPublic

Authored by csigg on Nov 28 2020, 5:03 AM.

Details

Summary

Given that OpState already implicit converts to Operator*, this seems reasonable.

The alternative would be to add more functions to OpState which forward to Operation.

Diff Detail

Event Timeline

csigg created this revision.Nov 28 2020, 5:03 AM
csigg requested review of this revision.Nov 28 2020, 5:03 AM
ftynse accepted this revision.Nov 30 2020, 12:36 AM
This revision is now accepted and ready to land.Nov 30 2020, 12:36 AM
csigg added 1 blocking reviewer(s): rriddle.Nov 30 2020, 4:09 AM
This revision now requires review to proceed.Nov 30 2020, 4:09 AM
rriddle accepted this revision.Dec 1 2020, 2:29 PM

Much nicer, thanks!! We could probably remove some of the duplicated methods from Op now, the duplication doesn't bring a huge benefit IMO.

This revision is now accepted and ready to land.Dec 1 2020, 2:29 PM
csigg added a comment.Dec 2 2020, 6:44 AM

Much nicer, thanks!! We could probably remove some of the duplicated methods from Op now, the duplication doesn't bring a huge benefit IMO.

Sure, I can do that.