LLVM  6.0.0svn
Public Member Functions | Protected Member Functions | List of all members
llvm::MCParsedAsmOperand Class Referenceabstract

MCParsedAsmOperand - This abstract class represents a source-level assembly instruction operand. More...

#include "llvm/MC/MCParser/MCParsedAsmOperand.h"

Inheritance diagram for llvm::MCParsedAsmOperand:
Inheritance graph
[legend]

Public Member Functions

virtual ~MCParsedAsmOperand ()=default
 
void setConstraint (StringRef C)
 
StringRef getConstraint ()
 
void setMCOperandNum (unsigned OpNum)
 
unsigned getMCOperandNum ()
 
virtual StringRef getSymName ()
 
virtual void * getOpDecl ()
 
virtual bool isToken () const =0
 isToken - Is this a token operand? More...
 
virtual bool isImm () const =0
 isImm - Is this an immediate operand? More...
 
virtual bool isReg () const =0
 isReg - Is this a register operand? More...
 
virtual unsigned getReg () const =0
 
virtual bool isMem () const =0
 isMem - Is this a memory operand? More...
 
virtual SMLoc getStartLoc () const =0
 getStartLoc - Get the location of the first token of this operand. More...
 
virtual SMLoc getEndLoc () const =0
 getEndLoc - Get the location of the last token of this operand. More...
 
virtual bool needAddressOf () const
 needAddressOf - Do we need to emit code to get the address of the variable/label? Only valid when parsing MS-style inline assembly. More...
 
virtual bool isOffsetOf () const
 isOffsetOf - Do we need to emit code to get the offset of the variable, rather then the value of the variable? Only valid when parsing MS-style inline assembly. More...
 
virtual SMLoc getOffsetOfLoc () const
 getOffsetOfLoc - Get the location of the offset operator. More...
 
virtual void print (raw_ostream &OS) const =0
 print - Print a debug representation of the operand to the given stream. More...
 
virtual void dump () const
 dump - Print to the debug stream. More...
 

Protected Member Functions

 MCParsedAsmOperand ()=default
 
 MCParsedAsmOperand (const MCParsedAsmOperand &RHS)=default
 
MCParsedAsmOperandoperator= (const MCParsedAsmOperand &)=default
 

Detailed Description

MCParsedAsmOperand - This abstract class represents a source-level assembly instruction operand.

It should be subclassed by target-specific code. This base class is used by target-independent clients and is the interface between parsing an asm instruction and recognizing it.

Definition at line 25 of file MCParsedAsmOperand.h.

Constructor & Destructor Documentation

◆ MCParsedAsmOperand() [1/2]

llvm::MCParsedAsmOperand::MCParsedAsmOperand ( )
protecteddefault

◆ MCParsedAsmOperand() [2/2]

llvm::MCParsedAsmOperand::MCParsedAsmOperand ( const MCParsedAsmOperand RHS)
protecteddefault

◆ ~MCParsedAsmOperand()

virtual llvm::MCParsedAsmOperand::~MCParsedAsmOperand ( )
virtualdefault

Member Function Documentation

◆ dump()

void MCParsedAsmOperand::dump ( ) const
virtual

dump - Print to the debug stream.

Definition at line 132 of file MCAsmParser.cpp.

References llvm::dbgs().

Referenced by getOffsetOfLoc().

◆ getConstraint()

StringRef llvm::MCParsedAsmOperand::getConstraint ( )
inline

Definition at line 47 of file MCParsedAsmOperand.h.

Referenced by rewritesSort().

◆ getEndLoc()

virtual SMLoc llvm::MCParsedAsmOperand::getEndLoc ( ) const
pure virtual

getEndLoc - Get the location of the last token of this operand.

Implemented in llvm::AVROperand, and llvm::X86Operand.

Referenced by getOpDecl().

◆ getMCOperandNum()

unsigned llvm::MCParsedAsmOperand::getMCOperandNum ( )
inline

Definition at line 50 of file MCParsedAsmOperand.h.

Referenced by rewritesSort().

◆ getOffsetOfLoc()

virtual SMLoc llvm::MCParsedAsmOperand::getOffsetOfLoc ( ) const
inlinevirtual

getOffsetOfLoc - Get the location of the offset operator.

Reimplemented in llvm::X86Operand.

Definition at line 81 of file MCParsedAsmOperand.h.

References dump(), and print().

◆ getOpDecl()

virtual void* llvm::MCParsedAsmOperand::getOpDecl ( )
inlinevirtual

Reimplemented in llvm::X86Operand.

Definition at line 53 of file MCParsedAsmOperand.h.

References getEndLoc(), getReg(), getStartLoc(), isImm(), isMem(), isReg(), and isToken().

Referenced by rewritesSort().

◆ getReg()

virtual unsigned llvm::MCParsedAsmOperand::getReg ( ) const
pure virtual

Implemented in llvm::AVROperand, and llvm::X86Operand.

Referenced by getOpDecl(), and rewritesSort().

◆ getStartLoc()

virtual SMLoc llvm::MCParsedAsmOperand::getStartLoc ( ) const
pure virtual

getStartLoc - Get the location of the first token of this operand.

Implemented in llvm::AVROperand, and llvm::X86Operand.

Referenced by getOpDecl().

◆ getSymName()

virtual StringRef llvm::MCParsedAsmOperand::getSymName ( )
inlinevirtual

Reimplemented in llvm::X86Operand.

Definition at line 52 of file MCParsedAsmOperand.h.

Referenced by rewritesSort().

◆ isImm()

virtual bool llvm::MCParsedAsmOperand::isImm ( ) const
pure virtual

isImm - Is this an immediate operand?

Implemented in llvm::AVROperand, and llvm::X86Operand.

Referenced by getOpDecl(), and rewritesSort().

◆ isMem()

virtual bool llvm::MCParsedAsmOperand::isMem ( ) const
pure virtual

isMem - Is this a memory operand?

Implemented in llvm::X86Operand, and llvm::AVROperand.

Referenced by getOpDecl(), and IsSmallMemAccess().

◆ isOffsetOf()

virtual bool llvm::MCParsedAsmOperand::isOffsetOf ( ) const
inlinevirtual

isOffsetOf - Do we need to emit code to get the offset of the variable, rather then the value of the variable? Only valid when parsing MS-style inline assembly.

Reimplemented in llvm::X86Operand.

Definition at line 78 of file MCParsedAsmOperand.h.

◆ isReg()

virtual bool llvm::MCParsedAsmOperand::isReg ( ) const
pure virtual

isReg - Is this a register operand?

Implemented in llvm::X86Operand, and llvm::AVROperand.

Referenced by getOpDecl(), and rewritesSort().

◆ isToken()

virtual bool llvm::MCParsedAsmOperand::isToken ( ) const
pure virtual

isToken - Is this a token operand?

Implemented in llvm::AVROperand, and llvm::X86Operand.

Referenced by getOpDecl(), and previousEqual().

◆ needAddressOf()

virtual bool llvm::MCParsedAsmOperand::needAddressOf ( ) const
inlinevirtual

needAddressOf - Do we need to emit code to get the address of the variable/label? Only valid when parsing MS-style inline assembly.

Reimplemented in llvm::X86Operand.

Definition at line 73 of file MCParsedAsmOperand.h.

Referenced by rewritesSort().

◆ operator=()

MCParsedAsmOperand& llvm::MCParsedAsmOperand::operator= ( const MCParsedAsmOperand )
protecteddefault

◆ print()

virtual void llvm::MCParsedAsmOperand::print ( raw_ostream OS) const
pure virtual

print - Print a debug representation of the operand to the given stream.

Implemented in llvm::AVROperand, and llvm::X86Operand.

Referenced by getOffsetOfLoc(), and llvm::operator<<().

◆ setConstraint()

void llvm::MCParsedAsmOperand::setConstraint ( StringRef  C)
inline

Definition at line 46 of file MCParsedAsmOperand.h.

References llvm::StringRef::str().

◆ setMCOperandNum()

void llvm::MCParsedAsmOperand::setMCOperandNum ( unsigned  OpNum)
inline

Definition at line 49 of file MCParsedAsmOperand.h.


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