LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
llzk::SourceRefIndex Class Reference

Defines an index into an LLZK object. More...

#include <SourceRef.h>

Classes

struct  Hash

Public Member Functions

 SourceRefIndex (component::FieldDefOp f)
 SourceRefIndex (SymbolLookupResult< component::FieldDefOp > f)
 SourceRefIndex (const llvm::DynamicAPInt &i)
 SourceRefIndex (const llvm::APInt &i)
 SourceRefIndex (int64_t i)
 SourceRefIndex (const llvm::APInt &low, const llvm::APInt &high)
 SourceRefIndex (IndexRange r)
bool isField () const
component::FieldDefOp getField () const
bool isIndex () const
llvm::DynamicAPInt getIndex () const
bool isIndexRange () const
IndexRange getIndexRange () const
void dump () const
void print (mlir::raw_ostream &os) const
bool operator== (const SourceRefIndex &rhs) const
bool operator< (const SourceRefIndex &rhs) const
bool operator> (const SourceRefIndex &rhs) const
size_t getHash () const

Detailed Description

Defines an index into an LLZK object.

For structs, this is a field definition, and for arrays, this is an element index. Effectively a wrapper around a std::variant with extra utility methods.

Definition at line 36 of file SourceRef.h.

Constructor & Destructor Documentation

◆ SourceRefIndex() [1/7]

llzk::SourceRefIndex::SourceRefIndex ( component::FieldDefOp f)
inlineexplicit

Definition at line 40 of file SourceRef.h.

◆ SourceRefIndex() [2/7]

llzk::SourceRefIndex::SourceRefIndex ( SymbolLookupResult< component::FieldDefOp > f)
inlineexplicit

Definition at line 41 of file SourceRef.h.

◆ SourceRefIndex() [3/7]

llzk::SourceRefIndex::SourceRefIndex ( const llvm::DynamicAPInt & i)
inlineexplicit

Definition at line 42 of file SourceRef.h.

◆ SourceRefIndex() [4/7]

llzk::SourceRefIndex::SourceRefIndex ( const llvm::APInt & i)
inlineexplicit

Definition at line 43 of file SourceRef.h.

◆ SourceRefIndex() [5/7]

llzk::SourceRefIndex::SourceRefIndex ( int64_t i)
inlineexplicit

Definition at line 44 of file SourceRef.h.

◆ SourceRefIndex() [6/7]

llzk::SourceRefIndex::SourceRefIndex ( const llvm::APInt & low,
const llvm::APInt & high )
inline

Definition at line 45 of file SourceRef.h.

◆ SourceRefIndex() [7/7]

llzk::SourceRefIndex::SourceRefIndex ( IndexRange r)
inlineexplicit

Definition at line 47 of file SourceRef.h.

Member Function Documentation

◆ dump()

void llzk::SourceRefIndex::dump ( ) const
inline

Definition at line 73 of file SourceRef.h.

◆ getField()

component::FieldDefOp llzk::SourceRefIndex::getField ( ) const
inline

Definition at line 53 of file SourceRef.h.

◆ getHash()

size_t llzk::SourceRefIndex::getHash ( ) const
inline

Definition at line 96 of file SourceRef.h.

◆ getIndex()

llvm::DynamicAPInt llzk::SourceRefIndex::getIndex ( ) const
inline

Definition at line 62 of file SourceRef.h.

◆ getIndexRange()

IndexRange llzk::SourceRefIndex::getIndexRange ( ) const
inline

Definition at line 68 of file SourceRef.h.

◆ isField()

bool llzk::SourceRefIndex::isField ( ) const
inline

Definition at line 49 of file SourceRef.h.

◆ isIndex()

bool llzk::SourceRefIndex::isIndex ( ) const
inline

Definition at line 61 of file SourceRef.h.

◆ isIndexRange()

bool llzk::SourceRefIndex::isIndexRange ( ) const
inline

Definition at line 67 of file SourceRef.h.

◆ operator<()

bool llzk::SourceRefIndex::operator< ( const SourceRefIndex & rhs) const

Definition at line 49 of file SourceRef.cpp.

◆ operator==()

bool llzk::SourceRefIndex::operator== ( const SourceRefIndex & rhs) const
inline

Definition at line 76 of file SourceRef.h.

◆ operator>()

bool llzk::SourceRefIndex::operator> ( const SourceRefIndex & rhs) const
inline

Definition at line 90 of file SourceRef.h.

◆ print()

void llzk::SourceRefIndex::print ( mlir::raw_ostream & os) const

Definition at line 34 of file SourceRef.cpp.


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