diff options
| author | Alex Lorenz <arphaman@gmail.com> | 2015-06-23 16:35:26 +0000 |
|---|---|---|
| committer | Alex Lorenz <arphaman@gmail.com> | 2015-06-23 16:35:26 +0000 |
| commit | f3db51de5e44f2392b91444d4bbae9c71facfb44 (patch) | |
| tree | 4c8f8721c67dadee126a6b48ee681708266cdffe /llvm/lib/CodeGen/MIRParser/MILexer.h | |
| parent | d86e004b7ec3f041b27171c209a8275600f4bc71 (diff) | |
| download | bcm5719-llvm-f3db51de5e44f2392b91444d4bbae9c71facfb44.tar.gz bcm5719-llvm-f3db51de5e44f2392b91444d4bbae9c71facfb44.zip | |
MIR Serialization: Serialize physical register machine operands.
This commit introduces functionality that's used to serialize machine operands.
Only the physical register operands are serialized by this commit.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10525
llvm-svn: 240425
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MILexer.h')
| -rw-r--r-- | llvm/lib/CodeGen/MIRParser/MILexer.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MILexer.h b/llvm/lib/CodeGen/MIRParser/MILexer.h index d6a5d1f4ec9..24cbf7d72f3 100644 --- a/llvm/lib/CodeGen/MIRParser/MILexer.h +++ b/llvm/lib/CodeGen/MIRParser/MILexer.h @@ -30,8 +30,13 @@ struct MIToken { Eof, Error, + // Tokens with no info. + comma, + equal, + // Identifier tokens - Identifier + Identifier, + NamedRegister }; private: @@ -45,6 +50,8 @@ public: bool isError() const { return Kind == Error; } + bool isRegister() const { return Kind == NamedRegister; } + bool is(TokenKind K) const { return Kind == K; } bool isNot(TokenKind K) const { return Kind != K; } |

