MIR Serialization: Introduce a lexer for machine instructions.
authorAlex Lorenz <arphaman@gmail.com>
Mon, 22 Jun 2015 20:37:46 +0000 (20:37 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Mon, 22 Jun 2015 20:37:46 +0000 (20:37 +0000)
commit91370c5d62726374cf9ef95a49a0a287499c3cf8
treef751334d15625bd6c2dfb5509a4113ec351b0bc9
parentf22855079a30f981e87eb95599cbc628260d2f04
MIR Serialization: Introduce a lexer for machine instructions.

This commit adds a function that tokenizes the string containing
the machine instruction. This commit also adds a struct called
'MIToken' which is used to represent the lexer's tokens.

Reviewers: Sean Silva

Differential Revision: http://reviews.llvm.org/D10521

llvm-svn: 240323
llvm/lib/CodeGen/MIRParser/CMakeLists.txt
llvm/lib/CodeGen/MIRParser/MILexer.cpp [new file with mode: 0644]
llvm/lib/CodeGen/MIRParser/MILexer.h [new file with mode: 0644]
llvm/lib/CodeGen/MIRParser/MIParser.cpp
llvm/test/CodeGen/MIR/X86/machine-instructions.mir
llvm/test/CodeGen/MIR/X86/missing-instruction.mir [new file with mode: 0644]
llvm/test/CodeGen/MIR/X86/unrecognized-character.mir [new file with mode: 0644]