[all-commits] [llvm/llvm-project] 0c5cff: Add userData to the diagnostic handler C API

George Lyon via All-commits all-commits at lists.llvm.org
Mon Nov 23 09:55:50 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0c5cff300ffa1d5cc55f2b11e4546f18b3389aa6
      https://github.com/llvm/llvm-project/commit/0c5cff300ffa1d5cc55f2b11e4546f18b3389aa6
  Author: George <>
  Date:   2020-11-23 (Mon, 23 Nov 2020)

  Changed paths:
    M mlir/include/mlir-c/Diagnostics.h
    M mlir/lib/CAPI/IR/Diagnostics.cpp
    M mlir/test/CAPI/ir.c

  Log Message:
  -----------
  Add userData to the diagnostic handler C API

Previously, there was no way to add context to the diagnostic engine via the C API. Adding this ability makes it much easier to reason about memory ownership, particularly in reference-counted languages such as Swift. There are more details in the review comments.

Reviewed By: ftynse, mehdi_amini

Differential Revision: https://reviews.llvm.org/D91738




More information about the All-commits mailing list