From 254ecfbc405ad2d41532fa9d7a2ee82cc5a003a6 Mon Sep 17 00:00:00 2001 From: Mogball Date: Mon, 8 Nov 2021 20:36:10 +0000 Subject: [PATCH] [mlir][ods] fix c++11 build --- mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp index 52e921f..24dba68 100644 --- a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp +++ b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp @@ -420,8 +420,9 @@ void AttrOrTypeFormat::genParamsParser(ParamsDirective *el, FmtContext &ctx, raw_ostream &os) { os << " // Parse parameter list\n"; llvm::interleave( - el->getParams(), [&](auto param) { genVariableParser(param, ctx, os); }, - [&]() { genLiteralParser(",", ctx, os); }); + el->getParams(), + [&](auto param) { this->genVariableParser(param, ctx, os); }, + [&]() { this->genLiteralParser(",", ctx, os); }); } void AttrOrTypeFormat::genStructParser(StructDirective *el, FmtContext &ctx, @@ -522,8 +523,9 @@ void AttrOrTypeFormat::genVariablePrinter(const AttrOrTypeParameter ¶m, void AttrOrTypeFormat::genParamsPrinter(ParamsDirective *el, FmtContext &ctx, raw_ostream &os) { llvm::interleave( - el->getParams(), [&](auto param) { genVariablePrinter(param, ctx, os); }, - [&]() { genLiteralPrinter(",", ctx, os); }); + el->getParams(), + [&](auto param) { this->genVariablePrinter(param, ctx, os); }, + [&]() { this->genLiteralPrinter(",", ctx, os); }); } void AttrOrTypeFormat::genStructPrinter(StructDirective *el, FmtContext &ctx, @@ -531,12 +533,12 @@ void AttrOrTypeFormat::genStructPrinter(StructDirective *el, FmtContext &ctx, llvm::interleave( el->getParams(), [&](auto param) { - genLiteralPrinter(param.getName(), ctx, os); - genLiteralPrinter("=", ctx, os); + this->genLiteralPrinter(param.getName(), ctx, os); + this->genLiteralPrinter("=", ctx, os); os << tgfmt(" $_printer << ' ';\n", &ctx); - genVariablePrinter(param, ctx, os); + this->genVariablePrinter(param, ctx, os); }, - [&]() { genLiteralPrinter(",", ctx, os); }); + [&]() { this->genLiteralPrinter(",", ctx, os); }); } //===----------------------------------------------------------------------===// -- 2.7.4