[Mlir-commits] [mlir] [MLIR] Introduce new C bindings to differentiate between discardable and inherent attributes (PR #66332)
Mehdi Amini
llvmlistbot at llvm.org
Sat Sep 16 20:39:28 PDT 2023
================
@@ -397,23 +397,15 @@ static void printFirstOfEach(MlirContext ctx, MlirOperation operation) {
// CHECK: Terminator: func.return
// Get the attribute by index.
- MlirNamedAttribute namedAttr0 = mlirOperationGetAttribute(operation, 0);
- fprintf(stderr, "Get attr 0: ");
- mlirAttributePrint(namedAttr0.attribute, printToStderr, NULL);
+ MlirAttribute valueAttr0 = mlirOperationGetInherentAttributeByName(operation, mlirStringRefCreateFromCString("value"));
----------------
joker-eph wrote:
It used to be checked by `arc` for me :(
https://github.com/llvm/llvm-project/pull/66332
More information about the Mlir-commits
mailing list