File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -506,15 +506,20 @@ class FuncWriter : public NbdlWriter<FuncWriter> {
506506 WriteExpr (Op.getKey ());
507507 }
508508 OS << " , " ;
509- OS << " \n boost::hana::overload_linearly(" ;
510509
511510 auto & Ops = Op.getOverloads ().front ().getOperations ();
512- llvm::interleave (Ops, OS,
513- [&](mlir::Operation const & OverloadOp) {
514- Visit (const_cast <mlir::Operation*>(&OverloadOp));
515- }, " ,\n " );
511+ if (Ops.size () == 1 ) {
512+ Visit (const_cast <mlir::Operation*>(&Ops.front ()));
513+ } else {
514+ OS << " boost::hana::overload(" ;
515+ llvm::interleave (Ops, OS,
516+ [&](mlir::Operation const & OverloadOp) {
517+ Visit (const_cast <mlir::Operation*>(&OverloadOp));
518+ }, " ,\n " );
519+ OS << " )" ;
520+ }
516521
517- OS << " )) ;\n " ;
522+ OS << " );\n " ;
518523 }
519524
520525 void Visit (OverloadOp Op) {
@@ -630,7 +635,9 @@ class DefineStoreWriter : public NbdlWriter<DefineStoreWriter> {
630635 OS << " > {\n "
631636 " using Base = nbdl::strong_alias<" ;
632637 VisitType (V);
633- OS << " >;\n using Base::Base;\n " ;
638+ OS << " >;\n " ;
639+ OS << " using Base::Base;\n " ;
640+ OS << " using Base::operator=;\n " ;
634641 OS << " };\n " ;
635642 }
636643
You can’t perform that action at this time.
0 commit comments