From f3db51de5e44f2392b91444d4bbae9c71facfb44 Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Tue, 23 Jun 2015 16:35:26 +0000 Subject: 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 --- llvm/lib/CodeGen/MIRParser/MILexer.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/MIRParser/MILexer.h') 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; } -- cgit v1.2.3