MLIR 22.0.0git
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"

Public Member Functions

 Location (LocationAttr loc)
 Location (const LocationAttr::ImplType *impl)
MLIRContextgetContext () const
 Return the context this location is uniqued in.
 operator LocationAttr () const
 Access the impl location attribute.
LocationAttroperator-> () const
bool operator== (Location rhs) const
 Comparison operators.
bool operator!= (Location rhs) const
void print (raw_ostream &os) const
 Print the location.
void dump () const
friend::llvm::hash_code hash_value (Location arg)
const voidgetAsOpaquePointer () const
 Methods for supporting PointerLikeTypeTraits.

Static Public Member Functions

static Location getFromOpaquePointer (const void *pointer)
static bool classof (Attribute attr)
 Support llvm style casting.

Protected Attributes

LocationAttr impl
 The internal backing location attribute.

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 76 of file Location.h.

Constructor & Destructor Documentation

◆ Location() [1/2]

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

Definition at line 78 of file Location.h.

Referenced by getFromOpaquePointer(), hash_value(), operator!=(), and operator==().

◆ Location() [2/2]

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

Definition at line 81 of file Location.h.

Member Function Documentation

◆ classof()

bool mlir::Location::classof ( Attribute attr)
inlinestatic

Support llvm style casting.

Definition at line 109 of file Location.h.

◆ dump()

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

Definition at line 98 of file Location.h.

◆ getAsOpaquePointer()

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

◆ getContext()

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

◆ getFromOpaquePointer()

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

◆ hash_value()

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

References Location().

◆ operator LocationAttr()

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

Access the impl location attribute.

Definition at line 89 of file Location.h.

◆ operator!=()

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

Definition at line 94 of file Location.h.

References Location(), and rhs.

◆ operator->()

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

Definition at line 90 of file Location.h.

◆ operator==()

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

Comparison operators.

Definition at line 93 of file Location.h.

References Location(), and rhs.

◆ print()

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

Print the location.

Definition at line 97 of file Location.h.

Referenced by mlir::operator<<().

Member Data Documentation

◆ impl

LocationAttr mlir::Location::impl
protected

The internal backing location attribute.

Definition at line 113 of file Location.h.

Referenced by mlir::hash_value().


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