MLIR  16.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::LocationAttr Class Reference

Location objects represent source locations information in MLIR. More...

#include "mlir/IR/Location.h"

+ Inheritance diagram for mlir::LocationAttr:
+ Collaboration diagram for mlir::LocationAttr:

Public Member Functions

WalkResult walk (function_ref< WalkResult(Location)> walkFn)
 Walk all of the locations nested under, and including, the current. More...
- Public Member Functions inherited from mlir::Attribute
constexpr Attribute ()
 Attribute (const ImplType *impl)
 Attribute (const Attribute &other)=default
Attributeoperator= (const Attribute &other)=default
bool operator== (Attribute other) const
bool operator!= (Attribute other) const
 operator bool () const
bool operator! () const
template<typename... Tys>
bool isa () const
 Casting utility functions. More...
template<typename... Tys>
bool isa_and_nonnull () const
template<typename U >
dyn_cast () const
template<typename U >
dyn_cast_or_null () const
template<typename U >
cast () const
TypeID getTypeID ()
 Return a unique identifier for the concrete attribute type. More...
MLIRContextgetContext () const
 Return the context this attribute belongs to. More...
DialectgetDialect () const
 Get the dialect this attribute is registered to. More...
void print (raw_ostream &os, bool elideType=false) const
 Print the attribute. More...
void print (raw_ostream &os, AsmState &state, bool elideType=false) const
void dump () const
const voidgetAsOpaquePointer () const
 Get an opaque pointer to the attribute. More...
template<template< typename T > class Trait>
bool hasTrait ()
 Returns true if the type was registered with a particular trait. More...
const AbstractTygetAbstractAttribute () const
 Return the abstract descriptor for this attribute. More...
ImplTypegetImpl () const
 Return the internal Attribute implementation. More...

Static Public Member Functions

static bool classof (Attribute attr)
 Methods for support type inquiry through isa, cast, and dyn_cast. More...
- Static Public Member Functions inherited from mlir::Attribute
static bool classof (Attribute)
static Attribute getFromOpaquePointer (const void *ptr)
 Construct an attribute from the opaque pointer representation. More...

Additional Inherited Members

- Public Types inherited from mlir::Attribute
template<typename ConcreteType , typename BaseType , typename StorageType , template< typename T > class... Traits>
using AttrBase = detail::StorageUserBase< ConcreteType, BaseType, StorageType, detail::AttributeUniquer, Traits... >
 Utility class for implementing attributes. More...
using ImplType = AttributeStorage
using ValueType = void
using AbstractTy = AbstractAttribute
- Protected Attributes inherited from mlir::Attribute
ImplTypeimpl {nullptr}

Detailed Description

Location objects represent source locations information in MLIR.

LocationAttr acts as the anchor for all Location based attributes.

Definition at line 31 of file Location.h.

Member Function Documentation

◆ classof()

bool LocationAttr::classof ( Attribute  attr)

Methods for support type inquiry through isa, cast, and dyn_cast.

Definition at line 66 of file Location.cpp.

References mlir::Attribute::isa().

◆ walk()

WalkResult LocationAttr::walk ( function_ref< WalkResult(Location)>  walkFn)

Walk all of the locations nested under, and including, the current.

Definition at line 40 of file Location.cpp.

References mlir::WalkResult::advance(), and mlir::WalkResult::interrupt().

Referenced by collectLocationsFromLoc(), getFileLineColLoc(), and getLocationFromLoc().

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