summaryrefslogtreecommitdiff
path: root/mlir/lib/CAPI/IR/Diagnostics.cpp
AgeCommit message (Collapse)Author
2022-05-21[mlir] Move diagnostic handlers instead of copyingBenjamin Kramer
This also allows using unique_ptr instead of shared_ptr for the CAPI user data. NFCI.
2021-12-22Fix more clang-tidy cleanups in mlir/ (NFC)Mehdi Amini
2020-11-23Add userData to the diagnostic handler C APIGeorge
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
2020-11-04Switch the CallbackOstream wrapper in the MLIR C API to an Unbuffered streamMehdi Amini
This delegate the control of the buffering to the user of the API. This seems like a safer option as messages are immediately propagated to the user, which may lead to less surprising behavior during debugging for instance. In terms of performance, a user can add a buffered stream on the other side of the callback. Differential Revision: https://reviews.llvm.org/D90726
2020-10-07[mlir] Add support for diagnostics in C API.Alex Zinenko
Add basic support for registering diagnostic handlers with the context (actually, the diagnostic engine contained in the context) and processing diagnostic messages from the C API. Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D88736