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

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

#include "CodeGen/MIRParser/MILexer.h"

Public Types

enum  TokenKind {
  Eof, Error, Newline, comma,
  equal, underscore, colon, coloncolon,
  dot, exclaim, lparen, rparen,
  lbrace, rbrace, plus, minus,
  less, greater, kw_implicit, kw_implicit_define,
  kw_def, kw_dead, kw_dereferenceable, kw_killed,
  kw_undef, kw_internal, kw_early_clobber, kw_debug_use,
  kw_tied_def, kw_frame_setup, kw_debug_location, kw_cfi_same_value,
  kw_cfi_offset, kw_cfi_def_cfa_register, kw_cfi_def_cfa_offset, kw_cfi_def_cfa,
  kw_blockaddress, kw_intrinsic, kw_target_index, kw_half,
  kw_float, kw_double, kw_x86_fp80, kw_fp128,
  kw_ppc_fp128, kw_target_flags, kw_volatile, kw_non_temporal,
  kw_invariant, kw_align, kw_stack, kw_got,
  kw_jump_table, kw_constant_pool, kw_call_entry, kw_liveout,
  kw_address_taken, kw_landing_pad, kw_liveins, kw_successors,
  kw_floatpred, kw_intpred, md_tbaa, md_alias_scope,
  md_noalias, md_range, md_diexpr, Identifier,
  IntegerType, NamedRegister, MachineBasicBlockLabel, MachineBasicBlock,
  PointerType, ScalarType, StackObject, FixedStackObject,
  NamedGlobalValue, GlobalValue, ExternalSymbol, IntegerLiteral,
  FloatingPointLiteral, HexLiteral, VirtualRegister, ConstantPoolItem,
  JumpTableIndex, NamedIRBlock, IRBlock, NamedIRValue,
  IRValue, QuotedIRValue, SubRegisterIndex, StringConstant
}
 

Public Member Functions

 MIToken ()=default
 
MITokenreset (TokenKind Kind, StringRef Range)
 
MITokensetStringValue (StringRef StrVal)
 
MITokensetOwnedStringValue (std::string StrVal)
 
MITokensetIntegerValue (APSInt IntVal)
 
TokenKind kind () const
 
bool isError () const
 
bool isNewlineOrEOF () const
 
bool isErrorOrEOF () const
 
bool isRegister () const
 
bool isRegisterFlag () const
 
bool isMemoryOperandFlag () const
 
bool is (TokenKind K) const
 
bool isNot (TokenKind K) const
 
StringRef::iterator location () const
 
StringRef range () const
 
StringRef stringValue () const
 Return the token's string value. More...
 
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

◆ TokenKind

Enumerator
Eof 
Error 
Newline 
comma 
equal 
underscore 
colon 
coloncolon 
dot 
exclaim 
lparen 
rparen 
lbrace 
rbrace 
plus 
minus 
less 
greater 
kw_implicit 
kw_implicit_define 
kw_def 
kw_dead 
kw_dereferenceable 
kw_killed 
kw_undef 
kw_internal 
kw_early_clobber 
kw_debug_use 
kw_tied_def 
kw_frame_setup 
kw_debug_location 
kw_cfi_same_value 
kw_cfi_offset 
kw_cfi_def_cfa_register 
kw_cfi_def_cfa_offset 
kw_cfi_def_cfa 
kw_blockaddress 
kw_intrinsic 
kw_target_index 
kw_half 
kw_float 
kw_double 
kw_x86_fp80 
kw_fp128 
kw_ppc_fp128 
kw_target_flags 
kw_volatile 
kw_non_temporal 
kw_invariant 
kw_align 
kw_stack 
kw_got 
kw_jump_table 
kw_constant_pool 
kw_call_entry 
kw_liveout 
kw_address_taken 
kw_landing_pad 
kw_liveins 
kw_successors 
kw_floatpred 
kw_intpred 
md_tbaa 
md_alias_scope 
md_noalias 
md_range 
md_diexpr 
Identifier 
IntegerType 
NamedRegister 
MachineBasicBlockLabel 
MachineBasicBlock 
PointerType 
ScalarType 
StackObject 
FixedStackObject 
NamedGlobalValue 
GlobalValue 
ExternalSymbol 
IntegerLiteral 
FloatingPointLiteral 
HexLiteral 
VirtualRegister 
ConstantPoolItem 
JumpTableIndex 
NamedIRBlock 
IRBlock 
NamedIRValue 
IRValue 
QuotedIRValue 
SubRegisterIndex 
StringConstant 

Definition at line 29 of file MILexer.h.

Constructor & Destructor Documentation

◆ MIToken()

llvm::MIToken::MIToken ( )
default

Member Function Documentation

◆ hasIntegerValue()

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

◆ integerValue()

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

Definition at line 188 of file MILexer.h.

◆ is()

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

Definition at line 177 of file MILexer.h.

◆ isError()

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

Definition at line 153 of file MILexer.h.

References Error.

Referenced by maybeLexExlaim().

◆ isErrorOrEOF()

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

Definition at line 157 of file MILexer.h.

References Eof.

◆ isMemoryOperandFlag()

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

Definition at line 171 of file MILexer.h.

References kw_dereferenceable, kw_invariant, kw_non_temporal, kw_volatile, and StringConstant.

◆ isNewlineOrEOF()

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

Definition at line 155 of file MILexer.h.

References Eof, and Newline.

◆ isNot()

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

Definition at line 179 of file MILexer.h.

◆ isRegister()

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

Definition at line 159 of file MILexer.h.

References NamedRegister, underscore, and VirtualRegister.

◆ isRegisterFlag()

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

◆ kind()

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

Definition at line 151 of file MILexer.h.

◆ location()

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

Definition at line 181 of file MILexer.h.

References llvm::StringRef::begin().

Referenced by maybeLexExlaim().

◆ range()

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

Definition at line 183 of file MILexer.h.

◆ reset()

MIToken & MIToken::reset ( TokenKind  Kind,
StringRef  Range 
)

◆ setIntegerValue()

MIToken & MIToken::setIntegerValue ( APSInt  IntVal)

Definition at line 85 of file MILexer.cpp.

Referenced by maybeLexNumericalLiteral().

◆ setOwnedStringValue()

MIToken & MIToken::setOwnedStringValue ( std::string  StrVal)

Definition at line 79 of file MILexer.cpp.

Referenced by lexName().

◆ setStringValue()

MIToken & MIToken::setStringValue ( StringRef  StrVal)

Definition at line 74 of file MILexer.cpp.

References llvm::tgtok::StrVal.

Referenced by maybeLexIdentifier().

◆ stringValue()

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

Return the token's string value.

Definition at line 186 of file MILexer.h.


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