This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Update DialectAsmParser::parseString to use std::string instead of StringRef
ClosedPublic

Authored by rriddle on Aug 23 2021, 3:00 PM.

Details

Summary

This allows for parsing strings that have escape sequences, which require constructing
a string (as they can't be represented by looking at the Token contents directly).

Depends On D108586

Diff Detail

Event Timeline

rriddle created this revision.Aug 23 2021, 3:00 PM
rriddle requested review of this revision.Aug 23 2021, 3:00 PM
jpienaar accepted this revision.Aug 23 2021, 5:37 PM

OOC why can't they be represented as a token? (I'm assuming as we need to differentiate at higher level than where token is constructed but could be wrong)

This revision is now accepted and ready to land.Aug 23 2021, 5:37 PM

OOC why can't they be represented as a token? (I'm assuming as we need to differentiate at higher level than where token is constructed but could be wrong)

They are represented as tokens, but we can't use the raw token value as the string (like we currently are). E.g. we \22foo\22 is not the same as "foo".