[all-commits] [llvm/llvm-project] 0e10d1: [mlir-c] Use a status enum for the type conversion...

Maksim Levental via All-commits all-commits at lists.llvm.org
Sat Jul 18 11:44:18 PDT 2026


  Branch: refs/heads/users/makslevental/mlir-c-typeconverter-materialization
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e10d1f261c6670fbcf1f45afce2f86c9fb29fe6
      https://github.com/llvm/llvm-project/commit/0e10d1f261c6670fbcf1f45afce2f86c9fb29fe6
  Author: makslevental <maksim.levental at gmail.com>
  Date:   2026-07-18 (Sat, 18 Jul 2026)

  Changed paths:
    M mlir/include/mlir-c/Rewrite.h
    M mlir/lib/CAPI/Transforms/Rewrite.cpp
    M mlir/test/CAPI/rewrite.c

  Log Message:
  -----------
  [mlir-c] Use a status enum for the type conversion callback

The 1:1 conversion callback returned MlirLogicalResult and encoded the
three C++ conversion states implicitly: returning failure meant "try
another conversion", while returning success with a null out-parameter
meant a hard failure. This dual encoding was easy to misuse and the doc
comment conflated the two.

Return a MlirTypeConverterConversionStatus enum with explicit Success,
Failure (do not try another), and Declined (try another) states, and add
a test covering the decline-fallback and hard-failure paths.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list