Lines Matching defs:optional

62 #include <optional>
267 // Optional case (not that optional allocatable/pointer cannot be absent
460 /// Create an optional dummy argument value from entity \p exv that may be
485 /// Create an optional dummy argument address from entity \p exv that may be
501 /// Create an optional dummy argument address from entity \p exv that may be
509 // Non allocatable/pointer optional box -> simply forward
534 for (const std::optional<Fortran::evaluate::ActualArgument> &arg :
584 /// Given an optional fir.box, returns an fir.box that is the original one if
645 const std::optional<Fortran::evaluate::ActualArgument> matrix =
734 /// semantics as an absent optional box value. Note: this code should
816 std::optional<int> unsignedKind = std::nullopt) {
834 std::optional<int> unsignedKind = std::nullopt) {
1403 if (std::optional<std::string> str = p->AsString())
1846 std::optional<mlir::Type> resultType,
1847 std::optional<const Fortran::evaluate::SpecificIntrinsic> intrinsic =
1857 using ExvAndPresence = std::pair<ExtValue, std::optional<mlir::Value>>;
1894 auto isPresent = [&](std::size_t i) -> std::optional<mlir::Value> {
1909 // Assumed type optional.
1932 // Absent optional.
1946 ExtValue optional = lowerIntrinsicArgumentAsInquired(*expr);
1947 mlir::Value isPresent = genActualIsPresentTest(builder, loc, optional);
1951 genOptionalValue(builder, loc, optional, isPresent));
1955 genOptionalAddr(builder, loc, optional, isPresent));
1959 genOptionalBox(builder, loc, optional, isPresent));
1962 operands.emplace_back(optional);
2006 // optional/alternate return arguments. Statement functions cannot be
2013 assert(bind && "optional argument in statement function");
2092 std::optional<mlir::Type> resultType) {
2169 std::optional<mlir::Value> restrictCopyAndFreeAtRuntime;
2192 std::optional<mlir::Value> restrictCopyAtRuntime,
2423 // callee side. Note: if wholeSymbol is optional, it cannot be
2456 TODO(loc, "parametrized derived type optional scalar argument copy-in");
2490 std::pair<ExtValue, std::optional<mlir::Value>>
2513 [&]() -> std::pair<ExtValue, std::optional<mlir::Value>> {
2563 // Actual argument is a non-optional, non-pointer, non-allocatable
2583 std::optional<mlir::Type> resultType) {
2773 // actual argument to optional fir.box dummy. It is legal to pass
2774 // unallocated/disassociated entity to an optional. In this case, an
2779 // optional dummy argument is illegal (15.5.2.12 point 3 (8)). So
2818 // function expecting an optional unlimited polymorphic dummy
2937 std::optional<mlir::Type> resTy;
3369 std::optional<llvm::SmallVector<mlir::Value>> ubounds) {
3388 std::optional<llvm::SmallVector<mlir::Value>> ubounds) {
3709 static const std::optional<Fortran::evaluate::ActualArgument>
3713 for (const std::optional<Fortran::evaluate::ActualArgument> &arg :
3856 if (std::optional<Fortran::evaluate::ConstantSubscripts> constantShape =
3932 std::optional<Fortran::evaluate::DataRef> dref =
4148 // If all arrays operand appears in optional position, then none of them
4158 /// based on the destination and operand array loads, or an optional
4174 const std::optional<Fortran::evaluate::ActualArgument> passArg =
4580 /// a nullptr (because this is an absent optional or unallocated/disassociated
4651 std::optional<mlir::Type> retTy,
4652 std::optional<const Fortran::evaluate::SpecificIntrinsic> intrinsic =
4664 using CcPairT = std::pair<CC, std::optional<mlir::Value>>;
4697 auto isPresent = [&](std::size_t i) -> std::optional<mlir::Value> {
4710 // Absent optional.
4726 TODO(loc, "non trivial optional elemental intrinsic array "
4769 std::optional<mlir::Type> retTy) {
4807 "passing dynamically optional argument to elemental procedures");
4990 std::optional<mlir::Type> retTy) {
5985 // optional or an unallocated optional.
5999 // Pointer optional arrays cannot be absent. The only kind of entities
6000 // that can get here are optional assumed shape and polymorphic entities.
6019 // Place the array as optional on the arrayOperands stack so that its
6021 // (that is if there is no non optional array arguments).
6044 TODO(loc, "optional arguments in user defined elemental procedures");
6419 std::optional<mlir::Value> charLen;
6503 std::optional<mlir::Value> charLen;
6627 std::optional<int> unsignedKind = std::nullopt) {
7312 std::optional<llvm::SmallVector<mlir::Value>> ubs) {
7327 std::optional<CC> ccStoreToDest;
7328 std::optional<std::function<void(llvm::ArrayRef<mlir::Value>)>> ccPrelude;
7329 std::optional<std::function<fir::ArrayLoadOp(llvm::ArrayRef<mlir::Value>)>>
7343 std::optional<ConstituentSemantics> nextPathSemant;
7346 std::optional<llvm::SmallVector<mlir::Value>> lbounds;
7347 std::optional<llvm::SmallVector<mlir::Value>> ubounds;
7455 std::optional<llvm::SmallVector<mlir::Value>> ubounds,
7697 if (std::optional<fir::ArrayLoadOp> ldOpt = esp.getLhsLoad(i.index())) {