My Project
Public Member Functions | Static Public Member Functions | List of all members
mlir::Identifier Class Reference

#include <Identifier.h>

Public Member Functions

 Identifier (const Identifier &)=default
 
Identifieroperator= (const Identifier &other)=default
 
StringRef strref () const
 Return a StringRef for the string. More...
 
 operator StringRef () const
 Identifiers implicitly convert to StringRefs. More...
 
std::string str () const
 Return an std::string. More...
 
const char * c_str () const
 Return a null terminated C string. More...
 
const char * data () const
 Return a pointer to the start of the string data. More...
 
unsigned size () const
 Return the number of bytes in this string. More...
 
bool is (StringRef string) const
 Return true if this identifier is the specified string. More...
 
const char * begin () const
 
const char * end () const
 
void print (raw_ostream &os) const
 
void dump () const
 
const void * getAsOpaquePointer () const
 

Static Public Member Functions

static Identifier get (StringRef str, MLIRContext *context)
 Return an identifier for the specified string. More...
 
static Identifier getFromOpaquePointer (const void *pointer)
 

Detailed Description

This class represents a uniqued string owned by an MLIRContext. Strings represented by this type cannot contain nul characters, and may not have a zero length.

This is a POD type with pointer size, so it should be passed around by value. The underlying data is owned by MLIRContext and is thus immortal for almost all clients.

Constructor & Destructor Documentation

◆ Identifier()

mlir::Identifier::Identifier ( const Identifier )
default

Member Function Documentation

◆ begin()

const char* mlir::Identifier::begin ( ) const
inline

◆ c_str()

const char* mlir::Identifier::c_str ( ) const
inline

Return a null terminated C string.

◆ data()

const char* mlir::Identifier::data ( ) const
inline

Return a pointer to the start of the string data.

◆ dump()

void Identifier::dump ( ) const

◆ end()

const char* mlir::Identifier::end ( ) const
inline

◆ get()

Identifier Identifier::get ( StringRef  str,
MLIRContext context 
)
static

Return an identifier for the specified string.

◆ getAsOpaquePointer()

const void* mlir::Identifier::getAsOpaquePointer ( ) const
inline

◆ getFromOpaquePointer()

static Identifier mlir::Identifier::getFromOpaquePointer ( const void *  pointer)
inlinestatic

◆ is()

bool mlir::Identifier::is ( StringRef  string) const
inline

Return true if this identifier is the specified string.

◆ operator StringRef()

mlir::Identifier::operator StringRef ( ) const
inline

Identifiers implicitly convert to StringRefs.

◆ operator=()

Identifier& mlir::Identifier::operator= ( const Identifier other)
default

◆ print()

void Identifier::print ( raw_ostream &  os) const

◆ size()

unsigned mlir::Identifier::size ( ) const
inline

Return the number of bytes in this string.

◆ str()

std::string mlir::Identifier::str ( ) const
inline

Return an std::string.

◆ strref()

StringRef mlir::Identifier::strref ( ) const
inline

Return a StringRef for the string.


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