@@ -505,7 +505,6 @@ struct IntrinsicLibrary {
505
505
mlir::Value genFloor (mlir::Type, llvm::ArrayRef<mlir::Value>);
506
506
mlir::Value genFraction (mlir::Type resultType,
507
507
mlir::ArrayRef<mlir::Value> args);
508
- void genGetCommand (mlir::ArrayRef<fir::ExtendedValue> args);
509
508
void genGetCommandArgument (mlir::ArrayRef<fir::ExtendedValue> args);
510
509
void genGetEnvironmentVariable (llvm::ArrayRef<fir::ExtendedValue>);
511
510
fir::ExtendedValue genIall (mlir::Type, llvm::ArrayRef<fir::ExtendedValue>);
@@ -803,13 +802,6 @@ static constexpr IntrinsicHandler handlers[]{
803
802
{" exponent" , &I::genExponent},
804
803
{" floor" , &I::genFloor},
805
804
{" fraction" , &I::genFraction},
806
- {" get_command" ,
807
- &I::genGetCommand,
808
- {{{" command" , asBox, handleDynamicOptional},
809
- {" length" , asBox, handleDynamicOptional},
810
- {" status" , asAddr, handleDynamicOptional},
811
- {" errmsg" , asBox, handleDynamicOptional}}},
812
- /* isElemental=*/ false },
813
805
{" get_command_argument" ,
814
806
&I::genGetCommandArgument,
815
807
{{{" number" , asValue},
@@ -3196,44 +3188,6 @@ mlir::Value IntrinsicLibrary::genFraction(mlir::Type resultType,
3196
3188
fir::runtime::genFraction (builder, loc, fir::getBase (args[0 ])));
3197
3189
}
3198
3190
3199
- // GET_COMMAND
3200
- void IntrinsicLibrary::genGetCommand (llvm::ArrayRef<fir::ExtendedValue> args) {
3201
- assert (args.size () == 4 );
3202
- const fir::ExtendedValue &command = args[0 ];
3203
- const fir::ExtendedValue &length = args[1 ];
3204
- const fir::ExtendedValue &status = args[2 ];
3205
- const fir::ExtendedValue &errmsg = args[3 ];
3206
-
3207
- // If none of the optional parameters are present, do nothing.
3208
- if (!isStaticallyPresent (command) && !isStaticallyPresent (length) &&
3209
- !isStaticallyPresent (status) && !isStaticallyPresent (errmsg))
3210
- return ;
3211
-
3212
- mlir::Type boxNoneTy = fir::BoxType::get (builder.getNoneType ());
3213
- mlir::Value commandBox =
3214
- isStaticallyPresent (command)
3215
- ? fir::getBase (command)
3216
- : builder.create <fir::AbsentOp>(loc, boxNoneTy).getResult ();
3217
- mlir::Value lenBox =
3218
- isStaticallyPresent (length)
3219
- ? fir::getBase (length)
3220
- : builder.create <fir::AbsentOp>(loc, boxNoneTy).getResult ();
3221
- mlir::Value errBox =
3222
- isStaticallyPresent (errmsg)
3223
- ? fir::getBase (errmsg)
3224
- : builder.create <fir::AbsentOp>(loc, boxNoneTy).getResult ();
3225
- mlir::Value stat =
3226
- fir::runtime::genGetCommand (builder, loc, commandBox, lenBox, errBox);
3227
- if (isStaticallyPresent (status)) {
3228
- mlir::Value statAddr = fir::getBase (status);
3229
- mlir::Value statIsPresentAtRuntime =
3230
- builder.genIsNotNullAddr (loc, statAddr);
3231
- builder.genIfThen (loc, statIsPresentAtRuntime)
3232
- .genThen ([&]() { builder.createStoreWithConvert (loc, stat, statAddr); })
3233
- .end ();
3234
- }
3235
- }
3236
-
3237
3191
// GET_COMMAND_ARGUMENT
3238
3192
void IntrinsicLibrary::genGetCommandArgument (
3239
3193
llvm::ArrayRef<fir::ExtendedValue> args) {
0 commit comments