[Mlir-commits] [mlir] [mlir][python] bind block predecessors and successors (PR #145116)
Maksim Levental
llvmlistbot at llvm.org
Sat Jun 21 13:35:21 PDT 2025
================
@@ -986,6 +986,20 @@ MLIR_CAPI_EXPORTED MlirValue mlirBlockGetArgument(MlirBlock block,
MLIR_CAPI_EXPORTED void
mlirBlockPrint(MlirBlock block, MlirStringCallback callback, void *userData);
+/// Returns the number of successor blocks of the block.
+MLIR_CAPI_EXPORTED intptr_t mlirBlockGetNumSuccessors(MlirBlock block);
----------------
makslevental wrote:
added the test but not sure what's going on with FileCheck:
```
/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/CAPI/ir.c:2444:18: error: CHECK-LABEL: expected string not found in input
// CHECK-LABEL: @testBlockPredecessorsSuccessors
^
<stdin>:243:18: note: scanning from here
@test_diagnostics
^
<stdin>:245:1: note: possible intended match here
test diagnostics
^
Input file: <stdin>
Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/CAPI/ir.c
-dump-input=help explains the following input dump.
Input was:
<<<<<<
.
.
.
238: interrupt: arith.addi
239: skip: builtin.module
240: skip: func.func
241: skip: func.func
242: @testBlockPredecessorsSuccessors
243: @test_diagnostics
```
https://github.com/llvm/llvm-project/pull/145116
More information about the Mlir-commits
mailing list