[mlir] Add support for diagnostics in C API.
authorAlex Zinenko <zinenko@google.com>
Wed, 7 Oct 2020 12:38:10 +0000 (14:38 +0200)
committerAlex Zinenko <zinenko@google.com>
Wed, 7 Oct 2020 12:42:02 +0000 (14:42 +0200)
commit7b5dfb400a67f03122b43cd5d59b8b1ef6d00147
tree28b551e399da011170c2628b5acb9a9d9a290d20
parent6e6a5acf005681d6b6815c0618d0d263ef8397fa
[mlir] Add support for diagnostics in C API.

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
mlir/include/mlir-c/Diagnostics.h [new file with mode: 0644]
mlir/include/mlir-c/Support.h
mlir/include/mlir/CAPI/Diagnostics.h [new file with mode: 0644]
mlir/include/mlir/CAPI/Support.h
mlir/lib/CAPI/IR/CMakeLists.txt
mlir/lib/CAPI/IR/Diagnostics.cpp [new file with mode: 0644]
mlir/test/CAPI/ir.c