This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Replace OperandMatchResultTy with ParseStatus (NFC)
ClosedPublic

Authored by barannikov88 on Jul 2 2023, 8:19 PM.

Details

Summary

ParseStatus is slightly more convenient to use due to implicit
conversion from bool, which allows to do something like:

return Error(L, "msg");

when with MatchOperandResultTy it had to be:

Error(L, "msg");
return MatchOperand_ParseFail;

It also has more appropriate name since parse* methods are not only for
parsing operands.

Diff Detail

Event Timeline

barannikov88 created this revision.Jul 2 2023, 8:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2023, 8:19 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
barannikov88 requested review of this revision.Jul 2 2023, 8:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2023, 8:19 PM
iii added a comment.Jul 31 2023, 1:35 AM

The change looks good to me; the other arches apparently use either bool or ParseStatus here.

But only Uli can approve this, so let's wait for his opinion.

uweigand accepted this revision.Jul 31 2023, 6:02 AM

Sure, this looks like a nice cleanup - thanks! LGTM.

This revision is now accepted and ready to land.Jul 31 2023, 6:02 AM