Changeset View
Changeset View
Standalone View
Standalone View
mlir/lib/CAPI/IR/IR.cpp
Show First 20 Lines • Show All 175 Lines • ▼ Show 20 Lines | void mlirModuleDestroy(MlirModule module) { | ||||
// Transfer ownership to an OwningModuleRef so that its destructor is called. | // Transfer ownership to an OwningModuleRef so that its destructor is called. | ||||
OwningModuleRef(unwrap(module)); | OwningModuleRef(unwrap(module)); | ||||
} | } | ||||
MlirOperation mlirModuleGetOperation(MlirModule module) { | MlirOperation mlirModuleGetOperation(MlirModule module) { | ||||
return wrap(unwrap(module).getOperation()); | return wrap(unwrap(module).getOperation()); | ||||
} | } | ||||
MlirModule mlirModuleFromOperation(MlirOperation op) { | |||||
return wrap(dyn_cast<ModuleOp>(unwrap(op))); | |||||
} | |||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// Operation state API. | // Operation state API. | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
MlirOperationState mlirOperationStateGet(MlirStringRef name, MlirLocation loc) { | MlirOperationState mlirOperationStateGet(MlirStringRef name, MlirLocation loc) { | ||||
MlirOperationState state; | MlirOperationState state; | ||||
state.name = name; | state.name = name; | ||||
state.location = loc; | state.location = loc; | ||||
▲ Show 20 Lines • Show All 498 Lines • Show Last 20 Lines |