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)
commitf654cdae59a71576b4da603c44ea78e24fe3a2a4
tree7656f32ac24729242024d86e7e8e510be0d1c83a
parent47e71da4b3d2b7c6ed76c34ad45a0a90274a374b
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240323 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MIRParser/CMakeLists.txt
lib/CodeGen/MIRParser/MILexer.cpp [new file with mode: 0644]
lib/CodeGen/MIRParser/MILexer.h [new file with mode: 0644]
lib/CodeGen/MIRParser/MIParser.cpp
test/CodeGen/MIR/X86/machine-instructions.mir
test/CodeGen/MIR/X86/missing-instruction.mir [new file with mode: 0644]
test/CodeGen/MIR/X86/unrecognized-character.mir [new file with mode: 0644]