Skip to content

Commit 43a1a33

Browse files
authored
[mlir] add StringRef override for FunctionOpInterface::removeResultAttr (#129651)
A mirror of the corresponding overload for `removeArgAttr(unsigned index, ::llvm::StringRef name)` [here](https://github.com/llvm/llvm-project/blob/41473162fd886d7db548fb288cf3620570f73c17/mlir/include/mlir/Interfaces/FunctionInterfaces.td#L451-L454)
1 parent 6720465 commit 43a1a33

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mlir/include/mlir/Interfaces/FunctionInterfaces.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,10 @@ def FunctionOpInterface : OpInterface<"FunctionOpInterface", [
539539
::mlir::Attribute removeResultAttr(unsigned index, ::mlir::StringAttr name) {
540540
return ::mlir::function_interface_impl::removeResultAttr($_op, index, name);
541541
}
542+
::mlir::Attribute removeResultAttr(unsigned index, ::llvm::StringRef name) {
543+
return removeResultAttr(
544+
index, ::mlir::StringAttr::get(this->getOperation()->getContext(), name));
545+
}
542546

543547
/// Returns the dictionary attribute corresponding to the argument at
544548
/// 'index'. If there are no argument attributes at 'index', a null

0 commit comments

Comments
 (0)