15 #ifndef MLIR_CAPI_SUPPORT_H
16 #define MLIR_CAPI_SUPPORT_H
21 #include "llvm/ADT/StringRef.h"
22 #include "llvm/Support/LogicalResult.h"
25 class ThreadPoolInterface;
39 if (mlir::succeeded(res))
#define DEFINE_C_API_PTR_METHODS(name, cpptype)
#define DEFINE_C_API_METHODS(name, cpptype)
This class provides a way to define new TypeIDs at runtime.
This class provides an efficient unique identifier for a specific C++ type.
static MlirStringRef mlirStringRefCreate(const char *str, size_t length)
Constructs a string reference from the pointer and length.
static MlirLogicalResult mlirLogicalResultFailure(void)
Creates a logical result representing a failure.
static MlirLogicalResult mlirLogicalResultSuccess(void)
Creates a logical result representing a success.
static bool mlirLogicalResultIsSuccess(MlirLogicalResult res)
Checks if the given logical result represents a success.
llvm::StringRef unwrap(MlirStringRef ref)
Creates a StringRef out of its MLIR C API equivalent.
MlirStringRef wrap(llvm::StringRef ref)
Converts a StringRef into its MLIR C API equivalent.
The OpAsmOpInterface, see OpAsmInterface.td for more details.
A logical result value, essentially a boolean with named states.
A pointer to a sized fragment of a string, not necessarily null-terminated.
const char * data
Pointer to the first symbol.
size_t length
Length of the fragment.