diff --git a/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp --- a/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp @@ -136,10 +136,10 @@ auto protoArgs = funcAST.getProto()->getArgs(); // Declare all the function arguments in the symbol table. - for (const auto &name_value : + for (const auto nameValue : llvm::zip(protoArgs, entryBlock.getArguments())) { - if (failed(declare(std::get<0>(name_value)->getName(), - std::get<1>(name_value)))) + if (failed(declare(std::get<0>(nameValue)->getName(), + std::get<1>(nameValue)))) return nullptr; } diff --git a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp --- a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp @@ -136,10 +136,10 @@ auto protoArgs = funcAST.getProto()->getArgs(); // Declare all the function arguments in the symbol table. - for (const auto &name_value : + for (const auto nameValue : llvm::zip(protoArgs, entryBlock.getArguments())) { - if (failed(declare(std::get<0>(name_value)->getName(), - std::get<1>(name_value)))) + if (failed(declare(std::get<0>(nameValue)->getName(), + std::get<1>(nameValue)))) return nullptr; } diff --git a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp --- a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp @@ -136,10 +136,10 @@ auto protoArgs = funcAST.getProto()->getArgs(); // Declare all the function arguments in the symbol table. - for (const auto &name_value : + for (const auto nameValue : llvm::zip(protoArgs, entryBlock.getArguments())) { - if (failed(declare(std::get<0>(name_value)->getName(), - std::get<1>(name_value)))) + if (failed(declare(std::get<0>(nameValue)->getName(), + std::get<1>(nameValue)))) return nullptr; } diff --git a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp --- a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp @@ -136,10 +136,10 @@ auto protoArgs = funcAST.getProto()->getArgs(); // Declare all the function arguments in the symbol table. - for (const auto &name_value : + for (const auto nameValue : llvm::zip(protoArgs, entryBlock.getArguments())) { - if (failed(declare(std::get<0>(name_value)->getName(), - std::get<1>(name_value)))) + if (failed(declare(std::get<0>(nameValue)->getName(), + std::get<1>(nameValue)))) return nullptr; } diff --git a/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp --- a/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp @@ -136,10 +136,10 @@ auto protoArgs = funcAST.getProto()->getArgs(); // Declare all the function arguments in the symbol table. - for (const auto &name_value : + for (const auto nameValue : llvm::zip(protoArgs, entryBlock.getArguments())) { - if (failed(declare(std::get<0>(name_value)->getName(), - std::get<1>(name_value)))) + if (failed(declare(std::get<0>(nameValue)->getName(), + std::get<1>(nameValue)))) return nullptr; } diff --git a/mlir/examples/toy/Ch7/mlir/Dialect.cpp b/mlir/examples/toy/Ch7/mlir/Dialect.cpp --- a/mlir/examples/toy/Ch7/mlir/Dialect.cpp +++ b/mlir/examples/toy/Ch7/mlir/Dialect.cpp @@ -244,7 +244,7 @@ // Check that each of the elements are valid. llvm::ArrayRef attrElementValues = attrValue.getValue(); - for (const auto &it : llvm::zip(resultElementTypes, attrElementValues)) + for (const auto it : llvm::zip(resultElementTypes, attrElementValues)) if (failed(verifyConstantForType(std::get<0>(it), std::get<1>(it), op))) return mlir::failure(); return mlir::success(); diff --git a/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp --- a/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp @@ -190,9 +190,9 @@ auto protoArgs = funcAST.getProto()->getArgs(); // Declare all the function arguments in the symbol table. - for (const auto &name_value : + for (const auto nameValue : llvm::zip(protoArgs, entryBlock.getArguments())) { - if (failed(declare(*std::get<0>(name_value), std::get<1>(name_value)))) + if (failed(declare(*std::get<0>(nameValue), std::get<1>(nameValue)))) return nullptr; } diff --git a/mlir/tools/mlir-tblgen/TypeDefGen.cpp b/mlir/tools/mlir-tblgen/TypeDefGen.cpp --- a/mlir/tools/mlir-tblgen/TypeDefGen.cpp +++ b/mlir/tools/mlir-tblgen/TypeDefGen.cpp @@ -47,7 +47,7 @@ return; llvm::SmallSet dialects; - for (const TypeDef &typeDef : defs) + for (const TypeDef typeDef : defs) dialects.insert(typeDef.getDialect()); if (dialects.size() != 1) llvm::PrintFatalError("TypeDefs belonging to more than one dialect. Must " @@ -61,7 +61,7 @@ "generate types via '--typedefs-dialect'."); } - for (const TypeDef &typeDef : defs) + for (const TypeDef typeDef : defs) if (typeDef.getDialect().getName().equals(dialectName)) typeDefs.push_back(typeDef); }