[all-commits] [llvm/llvm-project] d88556: [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:41:45 PDT 2026


  Branch: refs/heads/users/makslevental/mlir-c-typeconverter-materialization
  Home:   https://github.com/llvm/llvm-project
  Commit: d88556da98669fe01bdf7839a0adae890c43c615
      https://github.com/llvm/llvm-project/commit/d88556da98669fe01bdf7839a0adae890c43c615
  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