LLVM  8.0.1
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_renamable, kw_tied_def, kw_frame_setup, kw_frame_destroy,
  kw_nnan, kw_ninf, kw_nsz, kw_arcp,
  kw_contract, kw_afn, kw_reassoc, kw_nuw,
  kw_nsw, kw_exact, kw_debug_location, kw_cfi_same_value,
  kw_cfi_offset, kw_cfi_rel_offset, kw_cfi_def_cfa_register, kw_cfi_def_cfa_offset,
  kw_cfi_adjust_cfa_offset, kw_cfi_escape, kw_cfi_def_cfa, kw_cfi_register,
  kw_cfi_remember_state, kw_cfi_restore, kw_cfi_restore_state, kw_cfi_undefined,
  kw_cfi_window_save, kw_cfi_aarch64_negate_ra_sign_state, 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_addrspace, 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, kw_pre_instr_symbol, kw_post_instr_symbol, kw_unknown_size,
  md_tbaa, md_alias_scope, md_noalias, md_range,
  md_diexpr, md_dilocation, Identifier, NamedRegister,
  NamedVirtualRegister, MachineBasicBlockLabel, MachineBasicBlock, StackObject,
  FixedStackObject, NamedGlobalValue, GlobalValue, ExternalSymbol,
  MCSymbol, 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_renamable 
kw_tied_def 
kw_frame_setup 
kw_frame_destroy 
kw_nnan 
kw_ninf 
kw_nsz 
kw_arcp 
kw_contract 
kw_afn 
kw_reassoc 
kw_nuw 
kw_nsw 
kw_exact 
kw_debug_location 
kw_cfi_same_value 
kw_cfi_offset 
kw_cfi_rel_offset 
kw_cfi_def_cfa_register 
kw_cfi_def_cfa_offset 
kw_cfi_adjust_cfa_offset 
kw_cfi_escape 
kw_cfi_def_cfa 
kw_cfi_register 
kw_cfi_remember_state 
kw_cfi_restore 
kw_cfi_restore_state 
kw_cfi_undefined 
kw_cfi_window_save 
kw_cfi_aarch64_negate_ra_sign_state 
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_addrspace 
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 
kw_pre_instr_symbol 
kw_post_instr_symbol 
kw_unknown_size 
md_tbaa 
md_alias_scope 
md_noalias 
md_range 
md_diexpr 
md_dilocation 
Identifier 
NamedRegister 
NamedVirtualRegister 
MachineBasicBlockLabel 
MachineBasicBlock 
StackObject 
FixedStackObject 
NamedGlobalValue 
GlobalValue 
ExternalSymbol 
MCSymbol 
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 215 of file MILexer.h.

◆ is()

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

Definition at line 204 of file MILexer.h.

◆ isError()

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

Definition at line 179 of file MILexer.h.

References Error.

Referenced by maybeLexExlaim().

◆ isErrorOrEOF()

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

Definition at line 183 of file MILexer.h.

References Eof.

◆ isMemoryOperandFlag()

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

Definition at line 198 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 181 of file MILexer.h.

References Eof, and Newline.

◆ isNot()

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

Definition at line 206 of file MILexer.h.

◆ isRegister()

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

Definition at line 185 of file MILexer.h.

References NamedRegister, NamedVirtualRegister, underscore, and VirtualRegister.

◆ isRegisterFlag()

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

◆ kind()

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

Definition at line 177 of file MILexer.h.

◆ location()

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

Definition at line 208 of file MILexer.h.

References llvm::StringRef::begin().

Referenced by maybeLexExlaim().

◆ range()

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

Definition at line 210 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 213 of file MILexer.h.


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