[Mlir-commits] [mlir] [mlir] Make eraseFunctionArguments fail instead of crash on used args (PR #203367)
Mehdi Amini
llvmlistbot at llvm.org
Fri Jun 12 03:16:26 PDT 2026
================
@@ -68,8 +68,10 @@ void insertFunctionResults(FunctionOpInterface op,
unsigned originalNumResults, Type newType);
/// Erase the specified arguments and update the function type attribute.
-void eraseFunctionArguments(FunctionOpInterface op, const BitVector &argIndices,
- Type newType);
+/// Returns failure if the function cannot be updated to have the new signature,
+/// e.g. because one of the erased arguments still has uses.
----------------
joker-eph wrote:
I'm not sure the API should defend against this instead of pushing this responsibility onto the caller?
https://github.com/llvm/llvm-project/pull/203367
More information about the Mlir-commits
mailing list