clang 22.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
clang::SpirvOperand Class Reference

Instances of this class represent operands to a SPIR-V type instruction. More...

#include "clang/AST/TypeBase.h"

Public Types

enum  SpirvOperandKind : unsigned char {
  Invalid , ConstantId , Literal , TypeId ,
  Max
}
 

Public Member Functions

 SpirvOperand ()
 
 SpirvOperand (SpirvOperandKind Kind, QualType ResultType, llvm::APInt Value)
 
 SpirvOperand (const SpirvOperand &Other)
 
 ~SpirvOperand ()
 
SpirvOperandoperator= (const SpirvOperand &Other)=default
 
bool operator== (const SpirvOperand &Other) const
 
bool operator!= (const SpirvOperand &Other) const
 
SpirvOperandKind getKind () const
 
bool isValid () const
 
bool isConstant () const
 
bool isLiteral () const
 
bool isType () const
 
llvm::APInt getValue () const
 
QualType getResultType () const
 
void Profile (llvm::FoldingSetNodeID &ID) const
 

Static Public Member Functions

static SpirvOperand createConstant (QualType ResultType, llvm::APInt Val)
 
static SpirvOperand createLiteral (llvm::APInt Val)
 
static SpirvOperand createType (QualType T)
 

Detailed Description

Instances of this class represent operands to a SPIR-V type instruction.

Definition at line 6782 of file TypeBase.h.

Member Enumeration Documentation

◆ SpirvOperandKind

Enumerator
Invalid 

Uninitialized.

ConstantId 

Integral value to represent as a SPIR-V OpConstant instruction ID.

Literal 

Integral value to represent as an immediate literal.

TypeId 

Type to represent as a SPIR-V type ID.

Max 

Definition at line 6784 of file TypeBase.h.

Constructor & Destructor Documentation

◆ SpirvOperand() [1/3]

clang::SpirvOperand::SpirvOperand ( )
inline

Definition at line 6801 of file TypeBase.h.

◆ SpirvOperand() [2/3]

clang::SpirvOperand::SpirvOperand ( SpirvOperandKind  Kind,
QualType  ResultType,
llvm::APInt  Value 
)
inline

Definition at line 6803 of file TypeBase.h.

◆ SpirvOperand() [3/3]

clang::SpirvOperand::SpirvOperand ( const SpirvOperand Other)
inline

Definition at line 6806 of file TypeBase.h.

References clang::Other.

◆ ~SpirvOperand()

clang::SpirvOperand::~SpirvOperand ( )
inline

Definition at line 6807 of file TypeBase.h.

Member Function Documentation

◆ createConstant()

static SpirvOperand clang::SpirvOperand::createConstant ( QualType  ResultType,
llvm::APInt  Val 
)
inlinestatic

Definition at line 6837 of file TypeBase.h.

Referenced by checkHLSLSpirvTypeOperand().

◆ createLiteral()

static SpirvOperand clang::SpirvOperand::createLiteral ( llvm::APInt  Val)
inlinestatic

Definition at line 6841 of file TypeBase.h.

Referenced by checkHLSLSpirvTypeOperand().

◆ createType()

static SpirvOperand clang::SpirvOperand::createType ( QualType  T)
inlinestatic

Definition at line 6845 of file TypeBase.h.

References clang::T.

Referenced by checkHLSLSpirvTypeOperand().

◆ getKind()

SpirvOperandKind clang::SpirvOperand::getKind ( ) const
inline

Definition at line 6818 of file TypeBase.h.

References Kind.

Referenced by clang::ASTRecordWriter::writeHLSLSpirvOperand().

◆ getResultType()

QualType clang::SpirvOperand::getResultType ( ) const
inline

Definition at line 6831 of file TypeBase.h.

Referenced by clang::ASTRecordWriter::writeHLSLSpirvOperand().

◆ getValue()

llvm::APInt clang::SpirvOperand::getValue ( ) const
inline

Definition at line 6825 of file TypeBase.h.

Referenced by clang::ASTRecordWriter::writeHLSLSpirvOperand().

◆ isConstant()

bool clang::SpirvOperand::isConstant ( ) const
inline

Definition at line 6821 of file TypeBase.h.

References Kind.

Referenced by clang::ASTRecordWriter::writeHLSLSpirvOperand().

◆ isLiteral()

bool clang::SpirvOperand::isLiteral ( ) const
inline

Definition at line 6822 of file TypeBase.h.

References Kind.

Referenced by clang::ASTRecordWriter::writeHLSLSpirvOperand().

◆ isType()

bool clang::SpirvOperand::isType ( ) const
inline

Definition at line 6823 of file TypeBase.h.

References Kind.

Referenced by clang::ASTRecordWriter::writeHLSLSpirvOperand().

◆ isValid()

bool clang::SpirvOperand::isValid ( ) const
inline

Definition at line 6820 of file TypeBase.h.

References Kind, and clang::Max.

Referenced by clang::ASTRecordReader::readHLSLSpirvOperand().

◆ operator!=()

bool clang::SpirvOperand::operator!= ( const SpirvOperand Other) const
inline

Definition at line 6816 of file TypeBase.h.

References clang::Other.

◆ operator=()

SpirvOperand & clang::SpirvOperand::operator= ( const SpirvOperand Other)
default

◆ operator==()

bool clang::SpirvOperand::operator== ( const SpirvOperand Other) const
inline

Definition at line 6811 of file TypeBase.h.

References Kind, and clang::Other.

◆ Profile()

void clang::SpirvOperand::Profile ( llvm::FoldingSetNodeID &  ID) const
inline

Definition at line 6849 of file TypeBase.h.

References clang::QualType::getAsOpaquePtr(), ID, and Kind.


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