Changeset View
Changeset View
Standalone View
Standalone View
mlir/include/mlir/IR/SymbolInterfaces.td
Show All 27 Lines | let description = [{ | ||||
and constraints on `Symbol` operations. | and constraints on `Symbol` operations. | ||||
}]; | }]; | ||||
let methods = [ | let methods = [ | ||||
InterfaceMethod<"Returns the name of this symbol.", | InterfaceMethod<"Returns the name of this symbol.", | ||||
"StringRef", "getName", (ins), [{ | "StringRef", "getName", (ins), [{ | ||||
// Don't rely on the trait implementation as optional symbol operations | // Don't rely on the trait implementation as optional symbol operations | ||||
// may override this. | // may override this. | ||||
return mlir::SymbolTable::getSymbolName(op); | return mlir::SymbolTable::getSymbolName($_op); | ||||
}], /*defaultImplementation=*/[{ | }], /*defaultImplementation=*/[{ | ||||
return mlir::SymbolTable::getSymbolName(this->getOperation()); | return mlir::SymbolTable::getSymbolName(this->getOperation()); | ||||
}] | }] | ||||
>, | >, | ||||
InterfaceMethod<"Sets the name of this symbol.", | InterfaceMethod<"Sets the name of this symbol.", | ||||
"void", "setName", (ins "StringRef":$name), [{}], | "void", "setName", (ins "StringRef":$name), [{}], | ||||
/*defaultImplementation=*/[{ | /*defaultImplementation=*/[{ | ||||
this->getOperation()->setAttr( | this->getOperation()->setAttr( | ||||
▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines |