@@ -453,7 +453,7 @@ class TargetRewrite : public TargetRewriteBase<TargetRewrite> {
453
453
if (fnTy.getResults ().size () == 1 ) {
454
454
mlir::Type ty = fnTy.getResult (0 );
455
455
llvm::TypeSwitch<mlir::Type>(ty)
456
- .template Case <fir::ComplexType>([&](fir::ComplexType cmplx) {
456
+ .template Case <fir::ComplexType>([&](fir::ComplexType cmplx) {
457
457
wrap = rewriteCallComplexResultType (cmplx, newResTys, newInTys,
458
458
newOpers);
459
459
})
@@ -506,13 +506,16 @@ class TargetRewrite : public TargetRewriteBase<TargetRewrite> {
506
506
}
507
507
}
508
508
})
509
- .template Case <fir::ComplexType>([&](fir::ComplexType cmplx) {
509
+ .template Case <fir::ComplexType>([&](fir::ComplexType cmplx) {
510
510
rewriteCallComplexInputType (cmplx, oper, newInTys, newOpers);
511
511
})
512
512
.template Case <mlir::ComplexType>([&](mlir::ComplexType cmplx) {
513
513
rewriteCallComplexInputType (cmplx, oper, newInTys, newOpers);
514
514
})
515
- .Default ([&](mlir::Type ty) { newInTys.push_back (ty); });
515
+ .Default ([&](mlir::Type ty) {
516
+ newInTys.push_back (ty);
517
+ newOpers.push_back (oper);
518
+ });
516
519
}
517
520
newInTys.insert (newInTys.end (), trailingInTys.begin (), trailingInTys.end ());
518
521
newOpers.insert (newOpers.end (), trailingOpers.begin (), trailingOpers.end ());
@@ -564,7 +567,7 @@ class TargetRewrite : public TargetRewriteBase<TargetRewrite> {
564
567
llvm::SmallVector<mlir::Type, 8 > newInTys;
565
568
for (mlir::Type ty : addrTy.getResults ()) {
566
569
llvm::TypeSwitch<mlir::Type>(ty)
567
- .Case <fir::ComplexType>([&](fir::ComplexType ty) {
570
+ .Case <fir::ComplexType>([&](fir::ComplexType ty) {
568
571
lowerComplexSignatureRes (ty, newResTys, newInTys);
569
572
})
570
573
.Case <mlir::ComplexType>([&](mlir::ComplexType ty) {
@@ -587,8 +590,9 @@ class TargetRewrite : public TargetRewriteBase<TargetRewrite> {
587
590
}
588
591
}
589
592
})
590
- .Case <fir::ComplexType>(
591
- [&](fir::ComplexType ty) { lowerComplexSignatureArg (ty, newInTys); })
593
+ .Case <fir::ComplexType>([&](fir::ComplexType ty) {
594
+ lowerComplexSignatureArg (ty, newInTys);
595
+ })
592
596
.Case <mlir::ComplexType>([&](mlir::ComplexType ty) {
593
597
lowerComplexSignatureArg (ty, newInTys);
594
598
})
@@ -647,7 +651,7 @@ class TargetRewrite : public TargetRewriteBase<TargetRewrite> {
647
651
// Convert return value(s)
648
652
for (auto ty : funcTy.getResults ())
649
653
llvm::TypeSwitch<mlir::Type>(ty)
650
- .Case <fir::ComplexType>([&](fir::ComplexType cmplx) {
654
+ .Case <fir::ComplexType>([&](fir::ComplexType cmplx) {
651
655
if (noComplexConversion)
652
656
newResTys.push_back (cmplx);
653
657
else
@@ -696,7 +700,7 @@ class TargetRewrite : public TargetRewriteBase<TargetRewrite> {
696
700
}
697
701
}
698
702
})
699
- .Case <fir::ComplexType>([&](fir::ComplexType cmplx) {
703
+ .Case <fir::ComplexType>([&](fir::ComplexType cmplx) {
700
704
if (noComplexConversion)
701
705
newInTys.push_back (cmplx);
702
706
else
0 commit comments