Lines Matching defs:constant
91 /// Helper class to lower an array constant to a global with an MLIR dense
131 &constant,
134 globalBuilder.tryConvertingToAttributes(builder, constant);
147 &constant) {
155 for (auto element : constant.values())
167 if (const auto *constant =
170 *constant);
182 // Not a "trivial" intrinsic constant array, or empty array.
212 // Lower a constant to a fir::ExtendedValue.
215 /// Generate a real constant with a value `value`.
224 /// Convert a scalar literal constant to IR.
276 llvm_unreachable("unhandled constant");
280 /// Create fir::string_lit from a scalar character constant.
319 // not construct another constant object in rodata.
324 // in read only data by hash consing it to a constant literal object.
374 fir::emitFatalError(loc, "constant structure constructor with an "
413 // Special handling for scalar c_ptr/c_funptr constants. The array constant
453 assert(!fir::isa_ref_type(val.getType()) && "expecting a constant value");
461 // not the address of a global constant).
645 /// initialized with the value of the constant.
651 const Fortran::evaluate::Constant<T> &constant) {
655 loc, std::make_unique<Fortran::lower::SomeExpr>(toEvExpr(constant)),
668 true, constant, {});
682 genInlinedArrayLit(converter, loc, arrayTy, constant);
740 const Fortran::evaluate::Constant<T> &constant,
742 if (constant.Rank() > 0)
743 return genArrayLit(converter, loc, constant,
745 std::optional<Fortran::evaluate::Scalar<T>> opt = constant.GetScalarValue();
746 assert(opt.has_value() && "constant has no value");
750 genScalarLit<T::kind>(builder, loc, opt.value(), constant.LEN(),
753 loc, builder.getCharacterLengthType(), constant.LEN());
771 if (const auto *constant = std::get_if<
774 return Fortran::lower::convertConstant(converter, loc, *constant,
780 fir::emitFatalError(loc, "not a constant derived type expression");
789 if (const auto *constant =
791 return Fortran::lower::convertConstant(converter, loc, *constant,
816 fir::emitFatalError(loc, "unexpected typeless constant value");