Switch the CallbackOstream wrapper in the MLIR C API to an Unbuffered stream
authorMehdi Amini <joker.eph@gmail.com>
Tue, 3 Nov 2020 23:46:42 +0000 (23:46 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Wed, 4 Nov 2020 06:36:32 +0000 (06:36 +0000)
commitb4fa6d3e13ef66baec8c2610c5ce39f3e470da12
treee581a3ed10252ae9d3fbfcd6b01e579804cd7c0b
parentf61d1028fa55846aadcd69be17ba06bf8a710952
Switch the CallbackOstream wrapper in the MLIR C API to an Unbuffered stream

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
mlir/include/mlir/CAPI/Utils.h
mlir/lib/CAPI/IR/AffineExpr.cpp
mlir/lib/CAPI/IR/AffineMap.cpp
mlir/lib/CAPI/IR/Diagnostics.cpp
mlir/lib/CAPI/IR/IR.cpp