This is an archive of the discontinued LLVM Phabricator instance.

[AsmParser] Provide direct access to mnemonic token. Allow assignment parsing to be hooked by target. Allow target to specify if identifier is a label.
ClosedPublic

Authored by colinl on Nov 2 2015, 12:09 PM.

Details

Summary

This allows AsmParsers to directly access the first token of a statement. This was creating an issue for statements that aren't lead by a token other than an identifier.

This also creates target hooks for checking if an identifier is a label and if AsmParser itself should parse assignment expressions.

"r31:30 = r21:20" is a register assignment. This trips up the parser because "r31:" looks like a label and an equals sign tells it to parse this as an assignment expression instead of an instruction.

Diff Detail

Repository
rL LLVM

Event Timeline

colinl updated this revision to Diff 38961.Nov 2 2015, 12:09 PM
colinl retitled this revision from to [AsmParser] Provide direct access to mnemonic token. Allow assignment parsing to be hooked by target. Allow target to specify if identifier is a label..
colinl updated this object.
colinl added reviewers: sidneym, mcrosier.
colinl set the repository for this revision to rL LLVM.
colinl added a subscriber: llvm-commits.
This revision was automatically updated to reflect the committed changes.

And here is yet another commit that you landed without getting an LGTM from
anyone.