This is an archive of the discontinued LLVM Phabricator instance.

[mlir][OpAsmParser] Add parseString method
ClosedPublic

Authored by zero9178 on Jul 4 2021, 7:04 AM.

Details

Summary

Basically every kind of parseOptional* method in DialectAsmParser has a corresponding parse* method which will emit an error if the requested token has not been found. An odd one out of this rule is parseOptionalString which does not have a corresponding parseString method.

This patch adds that method and implements it in basically the same fashion as parseKeyword, by first going through parseOptionalString and emitting an error on failure.

Diff Detail

Event Timeline

zero9178 created this revision.Jul 4 2021, 7:04 AM
zero9178 requested review of this revision.Jul 4 2021, 7:04 AM
lattner accepted this revision.Jul 4 2021, 8:06 AM

LGTM, thanks!

This revision is now accepted and ready to land.Jul 4 2021, 8:06 AM
This revision was automatically updated to reflect the committed changes.