LLVM  3.7.0
Public Types | Public Member Functions | List of all members
llvm::MIToken Struct Reference

A token produced by the machine instruction lexer. More...

#include <MILexer.h>

Public Types

enum  TokenKind {
  Eof, Error, comma, equal,
  underscore, colon, kw_implicit, kw_implicit_define,
  kw_dead, kw_killed, kw_undef, Identifier,
  NamedRegister, MachineBasicBlock, NamedGlobalValue, GlobalValue,
  IntegerLiteral, VirtualRegister
}
 

Public Member Functions

 MIToken (TokenKind Kind, StringRef Range, unsigned StringOffset=0)
 
 MIToken (TokenKind Kind, StringRef Range, const APSInt &IntVal, unsigned StringOffset=0)
 
TokenKind kind () const
 
bool isError () const
 
bool isRegister () const
 
bool isRegisterFlag () const
 
bool is (TokenKind K) const
 
bool isNot (TokenKind K) const
 
StringRef::iterator location () const
 
StringRef stringValue () const
 
const APSIntintegerValue () const
 
bool hasIntegerValue () const
 

Detailed Description

A token produced by the machine instruction lexer.

Definition at line 28 of file MILexer.h.

Member Enumeration Documentation

Enumerator
Eof 
Error 
comma 
equal 
underscore 
colon 
kw_implicit 
kw_implicit_define 
kw_dead 
kw_killed 
kw_undef 
Identifier 
NamedRegister 
MachineBasicBlock 
NamedGlobalValue 
GlobalValue 
IntegerLiteral 
VirtualRegister 

Definition at line 29 of file MILexer.h.

Constructor & Destructor Documentation

llvm::MIToken::MIToken ( TokenKind  Kind,
StringRef  Range,
unsigned  StringOffset = 0 
)
inline

Definition at line 66 of file MILexer.h.

llvm::MIToken::MIToken ( TokenKind  Kind,
StringRef  Range,
const APSInt IntVal,
unsigned  StringOffset = 0 
)
inline

Definition at line 69 of file MILexer.h.

Member Function Documentation

bool llvm::MIToken::hasIntegerValue ( ) const
inline

Definition at line 97 of file MILexer.h.

References IntegerLiteral, and VirtualRegister.

const APSInt& llvm::MIToken::integerValue ( ) const
inline

Definition at line 95 of file MILexer.h.

bool llvm::MIToken::is ( TokenKind  K) const
inline

Definition at line 87 of file MILexer.h.

bool llvm::MIToken::isError ( ) const
inline

Definition at line 75 of file MILexer.h.

References Error.

bool llvm::MIToken::isNot ( TokenKind  K) const
inline

Definition at line 89 of file MILexer.h.

bool llvm::MIToken::isRegister ( ) const
inline

Definition at line 77 of file MILexer.h.

References NamedRegister, underscore, and VirtualRegister.

bool llvm::MIToken::isRegisterFlag ( ) const
inline

Definition at line 82 of file MILexer.h.

References kw_dead, kw_implicit, kw_implicit_define, kw_killed, and kw_undef.

TokenKind llvm::MIToken::kind ( ) const
inline

Definition at line 73 of file MILexer.h.

StringRef::iterator llvm::MIToken::location ( ) const
inline

Definition at line 91 of file MILexer.h.

References llvm::StringRef::begin().

StringRef llvm::MIToken::stringValue ( ) const
inline

Definition at line 93 of file MILexer.h.

References llvm::StringRef::drop_front().


The documentation for this struct was generated from the following file: