15 #ifndef LLVM_LIB_CODEGEN_MIRPARSER_MILEXER_H
16 #define LLVM_LIB_CODEGEN_MIRPARSER_MILEXER_H
61 unsigned StringOffset;
67 : Kind(Kind), StringOffset(StringOffset), Range(Range) {}
70 unsigned StringOffset = 0)
71 : Kind(Kind), StringOffset(StringOffset), Range(Range), IntVal(IntVal) {}
106 StringRef
Source, MIToken &Token,
StringRef lexMIToken(StringRef Source, MIToken &Token, function_ref< void(StringRef::iterator, const Twine &)> ErrorCallback)
Consume a single machine instruction token in the given source and return the remaining source string...
StringRef::iterator location() const
MIToken(TokenKind Kind, StringRef Range, unsigned StringOffset=0)
bool isNot(TokenKind K) const
MIToken(TokenKind Kind, StringRef Range, const APSInt &IntVal, unsigned StringOffset=0)
bool isRegisterFlag() const
bool hasIntegerValue() const
StringRef stringValue() const
StringRef drop_front(size_t N=1) const
Return a StringRef equal to 'this' but with the first N elements dropped.
bool is(TokenKind K) const
const APSInt & integerValue() const
A token produced by the machine instruction lexer.
StringRef - Represent a constant reference to a string, i.e.