MLIR  14.0.0git
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
mlir::Location Class Reference

This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around a LocationAttr. More...

#include "mlir/IR/Location.h"

Collaboration diagram for mlir::Location:
Collaboration graph
[legend]

Public Member Functions

 Location (LocationAttr loc)
 
 Location (const LocationAttr::ImplType *impl)
 
MLIRContextgetContext () const
 Return the context this location is uniqued in. More...
 
 operator LocationAttr () const
 Access the impl location attribute. More...
 
LocationAttroperator-> () const
 
template<typename U >
bool isa () const
 Type casting utilities on the underlying location. More...
 
template<typename U >
dyn_cast () const
 
template<typename U >
cast () const
 
bool operator== (Location rhs) const
 Comparison operators. More...
 
bool operator!= (Location rhs) const
 
void print (raw_ostream &os) const
 Print the location. More...
 
void dump () const
 
const voidgetAsOpaquePointer () const
 Methods for supporting PointerLikeTypeTraits. More...
 

Static Public Member Functions

static Location getFromOpaquePointer (const void *pointer)
 

Protected Attributes

LocationAttr impl
 The internal backing location attribute. More...
 

Friends

::llvm::hash_code hash_value (Location arg)
 

Detailed Description

This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around a LocationAttr.

Definition at line 48 of file Location.h.

Constructor & Destructor Documentation

◆ Location() [1/2]

mlir::Location::Location ( LocationAttr  loc)
inline

Definition at line 50 of file Location.h.

◆ Location() [2/2]

mlir::Location::Location ( const LocationAttr::ImplType impl)
inline

Definition at line 53 of file Location.h.

Member Function Documentation

◆ cast()

template<typename U >
U mlir::Location::cast ( ) const
inline

◆ dump()

void mlir::Location::dump ( ) const
inline

Definition at line 75 of file Location.h.

References mlir::Attribute::hash_value.

◆ dyn_cast()

template<typename U >
U mlir::Location::dyn_cast ( ) const
inline

◆ getAsOpaquePointer()

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

Methods for supporting PointerLikeTypeTraits.

Definition at line 80 of file Location.h.

Referenced by llvm::PointerLikeTypeTraits< mlir::Location >::getAsVoidPointer().

◆ getContext()

MLIRContext* mlir::Location::getContext ( ) const
inline

Return the context this location is uniqued in.

Definition at line 58 of file Location.h.

Referenced by mlir::Operation::create(), and verifyTransferOp().

◆ getFromOpaquePointer()

static Location mlir::Location::getFromOpaquePointer ( const void pointer)
inlinestatic

◆ isa()

template<typename U >
bool mlir::Location::isa ( ) const
inline

◆ operator LocationAttr()

mlir::Location::operator LocationAttr ( ) const
inline

Access the impl location attribute.

Definition at line 61 of file Location.h.

References mlir::Attribute::impl.

◆ operator!=()

bool mlir::Location::operator!= ( Location  rhs) const
inline

Definition at line 71 of file Location.h.

◆ operator->()

LocationAttr* mlir::Location::operator-> ( ) const
inline

Definition at line 62 of file Location.h.

References mlir::Attribute::impl.

◆ operator==()

bool mlir::Location::operator== ( Location  rhs) const
inline

Comparison operators.

Definition at line 70 of file Location.h.

◆ print()

void mlir::Location::print ( raw_ostream &  os) const
inline

Print the location.

Definition at line 74 of file Location.h.

Referenced by mlir::operator<<().

Friends And Related Function Documentation

◆ hash_value

::llvm::hash_code hash_value ( Location  arg)
friend

Definition at line 96 of file Location.h.

Member Data Documentation

◆ impl

LocationAttr mlir::Location::impl
protected

The internal backing location attribute.

Definition at line 87 of file Location.h.

Referenced by mlir::hash_value().


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