Index: mlir/tools/mlir-tblgen/RewriterGen.cpp =================================================================== --- mlir/tools/mlir-tblgen/RewriterGen.cpp +++ mlir/tools/mlir-tblgen/RewriterGen.cpp @@ -449,7 +449,8 @@ "passing the defining Operation"); auto nativeCodeCall = std::string(tgfmt( - fmt, &fmtCtx.addSubst("_loc", locToUse).withSelf(opName.str()), capture)); + 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