Changeset View
Changeset View
Standalone View
Standalone View
mlir/include/mlir/IR/OperationSupport.h
Show First 20 Lines • Show All 450 Lines • ▼ Show 20 Lines | public: | ||||
/// Return the name of the dialect this operation is registered to. | /// Return the name of the dialect this operation is registered to. | ||||
StringRef getDialectNamespace() const; | StringRef getDialectNamespace() const; | ||||
/// Return the dialect this operation is registered to if the dialect is | /// Return the dialect this operation is registered to if the dialect is | ||||
/// loaded in the context, or nullptr if the dialect isn't loaded. | /// loaded in the context, or nullptr if the dialect isn't loaded. | ||||
Dialect *getDialect() const { | Dialect *getDialect() const { | ||||
if (const auto *abstractOp = getAbstractOperation()) | if (const auto *abstractOp = getAbstractOperation()) | ||||
return &abstractOp->dialect; | return &abstractOp->dialect; | ||||
return representation.get<Identifier>().getDialect(); | return representation.get<Identifier>().getReferencedDialect(); | ||||
} | } | ||||
/// Return the operation name with dialect name stripped, if it has one. | /// Return the operation name with dialect name stripped, if it has one. | ||||
StringRef stripDialect() const; | StringRef stripDialect() const; | ||||
/// Return the name of this operation. This always succeeds. | /// Return the name of this operation. This always succeeds. | ||||
StringRef getStringRef() const; | StringRef getStringRef() const; | ||||
▲ Show 20 Lines • Show All 693 Lines • Show Last 20 Lines |