@@ -83,13 +83,11 @@ class ComplexExprEmitter : public StmtVisitor<ComplexExprEmitter, mlir::Value> {
8383
8484 mlir::Value VisitUnaryDeref (const Expr *e);
8585
86- mlir::Value VisitUnaryPlus (const UnaryOperator *e,
87- QualType promotionType = QualType());
86+ mlir::Value VisitUnaryPlus (const UnaryOperator *e);
8887
8988 mlir::Value VisitPlus (const UnaryOperator *e, QualType promotionType);
9089
91- mlir::Value VisitUnaryMinus (const UnaryOperator *e,
92- QualType promotionType = QualType());
90+ mlir::Value VisitUnaryMinus (const UnaryOperator *e);
9391
9492 mlir::Value VisitMinus (const UnaryOperator *e, QualType promotionType);
9593
@@ -185,17 +183,13 @@ mlir::Value ComplexExprEmitter::emitCast(CastKind ck, Expr *op,
185183 return {};
186184}
187185
188- mlir::Value ComplexExprEmitter::VisitUnaryPlus (const UnaryOperator *e,
189- QualType promotionType) {
190- QualType promotionTy = promotionType.isNull ()
191- ? getPromotionType (e->getSubExpr ()->getType ())
192- : promotionType;
186+ mlir::Value ComplexExprEmitter::VisitUnaryPlus (const UnaryOperator *e) {
187+ QualType promotionTy = getPromotionType (e->getSubExpr ()->getType ());
193188 mlir::Value result = VisitPlus (e, promotionTy);
194189 if (!promotionTy.isNull ()) {
195190 cgf.cgm .errorNYI (" ComplexExprEmitter::VisitUnaryPlus emitUnPromotedValue" );
196191 return {};
197192 }
198-
199193 return result;
200194}
201195
@@ -211,17 +205,13 @@ mlir::Value ComplexExprEmitter::VisitPlus(const UnaryOperator *e,
211205 cir::UnaryOpKind::Plus, op);
212206}
213207
214- mlir::Value ComplexExprEmitter::VisitUnaryMinus (const UnaryOperator *e,
215- QualType promotionType) {
216- QualType promotionTy = promotionType.isNull ()
217- ? getPromotionType (e->getSubExpr ()->getType ())
218- : promotionType;
208+ mlir::Value ComplexExprEmitter::VisitUnaryMinus (const UnaryOperator *e) {
209+ QualType promotionTy = getPromotionType (e->getSubExpr ()->getType ());
219210 mlir::Value result = VisitMinus (e, promotionTy);
220211 if (!promotionTy.isNull ()) {
221212 cgf.cgm .errorNYI (" ComplexExprEmitter::VisitUnaryMinus emitUnPromotedValue" );
222213 return {};
223214 }
224-
225215 return result;
226216}
227217
0 commit comments