#include "mlir-c/Diagnostics.h"
#include "mlir/CAPI/Diagnostics.h"
#include "mlir/CAPI/IR.h"
#include "mlir/CAPI/Support.h"
#include "mlir/CAPI/Utils.h"
#include "mlir/IR/Diagnostics.h"
usingnamespacemlir;
void mlirDiagnosticPrint(MlirDiagnostic diagnostic, MlirStringCallback callback,
void *userData) { … }
MlirLocation mlirDiagnosticGetLocation(MlirDiagnostic diagnostic) { … }
MlirDiagnosticSeverity mlirDiagnosticGetSeverity(MlirDiagnostic diagnostic) { … }
intptr_t mlirDiagnosticGetNumNotes(MlirDiagnostic diagnostic) { … }
MlirDiagnostic mlirDiagnosticGetNote(MlirDiagnostic diagnostic, intptr_t pos) { … }
static void deleteUserDataNoop(void *userData) { … }
MlirDiagnosticHandlerID mlirContextAttachDiagnosticHandler(
MlirContext context, MlirDiagnosticHandler handler, void *userData,
void (*deleteUserData)(void *)) { … }
void mlirContextDetachDiagnosticHandler(MlirContext context,
MlirDiagnosticHandlerID id) { … }
void mlirEmitError(MlirLocation location, const char *message) { … }