MLIR CAPI: how to set function argument names %arg0

See the reproducer below:

module  {
  func private @__match(%arg0: !llvm.ptr<i8>, %arg1: !llvm.ptr<i8>) -> i32 attributes {arg_attrs = [{llvm.name = "str"}, {llvm.name = "pattern"}]} {
    %0 = "std.constant"() {value = 1 : i32} : () -> i32
    "std.return"(%0) : (i32) -> ()
  }
}

I’ve ran the reproducer with mlir-opt (without options) still see the same output:

module  {
  func private @__match(%arg0: !llvm.ptr<i8>, %arg1: !llvm.ptr<i8>) -> i32 attributes {arg_attrs = [{llvm.name = "str"}, {llvm.name = "pattern"}]} {
    %c1_i32 = constant 1 : i32
    return %c1_i32 : i32
  }
}

I suspect it’s my version of llvm now if you’re seeing the expected output:

$ mlir-opt --version
Homebrew LLVM version 12.0.1
Optimized build.
Default target: x86_64-apple-darwin20.6.0
Host CPU: skylake

I’ve learned a lot @mehdi_amini appreciate your diligence and support.

regards,
Arun