Index: mlir/tools/mlir-tblgen/RewriterGen.cpp =================================================================== --- mlir/tools/mlir-tblgen/RewriterGen.cpp +++ mlir/tools/mlir-tblgen/RewriterGen.cpp @@ -448,8 +448,9 @@ PrintFatalError(loc, "NativeCodeCall must have $_self as argument for " "passing the defining Operation"); - auto nativeCodeCall = std::string(tgfmt( - fmt, &fmtCtx.addSubst("_loc", locToUse).withSelf(opName.str()), capture)); + auto nativeCodeCall = std::string( + tgfmt(fmt, &fmtCtx.addSubst("_loc", locToUse).withSelf(opName.str()), + static_cast>(capture))); emitMatchCheck(opName, formatv("!failed({0})", nativeCodeCall), formatv("\"{0} return failure\"", nativeCodeCall)); @@ -1152,7 +1153,8 @@ << " replacement: " << attrs[i] << "\n"); } - std::string symbol = tgfmt(fmt, &fmtCtx.addSubst("_loc", locToUse), attrs); + std::string symbol = tgfmt(fmt, &fmtCtx.addSubst("_loc", locToUse), + static_cast>(attrs)); // In general, NativeCodeCall without naming binding don't need this. To // ensure void helper function has been correctly labeled, i.e., use