diff --git a/flang/lib/Optimizer/CodeGen/TargetRewrite.cpp b/flang/lib/Optimizer/CodeGen/TargetRewrite.cpp index 4f5f1ff66718a..ae6e7ce798d99 100644 --- a/flang/lib/Optimizer/CodeGen/TargetRewrite.cpp +++ b/flang/lib/Optimizer/CodeGen/TargetRewrite.cpp @@ -842,10 +842,8 @@ class TargetRewrite : public fir::impl::TargetRewritePassBase { // Convert a CHARACTER argument type. This can involve separating // the pointer and the LEN into two arguments and moving the LEN // argument to the end of the arg list. - for (auto e : llvm::enumerate( - specifics->boxcharArgumentType(boxTy.getEleTy()))) { - auto &tup = e.value(); - auto index = e.index(); + for (auto &tup : + specifics->boxcharArgumentType(boxTy.getEleTy())) { auto attr = std::get(tup); auto argTy = std::get(tup); if (attr.isAppend()) {