1# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 2# See https://llvm.org/LICENSE.txt for license information. 3# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 4 5from ._llvm_ops_gen import * 6from ._llvm_enum_gen import * 7from .._mlir_libs._mlirDialectsLLVM import * 8from ..ir import Value 9from ._ods_common import get_op_result_or_op_results as _get_op_result_or_op_results 10 11 12def mlir_constant(value, *, loc=None, ip=None) -> Value: 13 return _get_op_result_or_op_results( 14 ConstantOp(res=value.type, value=value, loc=loc, ip=ip) 15 ) 16