From 6142a2797261f442797ab18430d8e3bcb1b9741d Mon Sep 17 00:00:00 2001 From: tg-at-google Date: Tue, 28 Jul 2020 16:17:21 -0400 Subject: [PATCH] Update tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc Co-authored-by: Mihai Maruseac --- .../compiler/mlir/tensorflow/translate/export_graphdef.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc b/tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc index e508f8fbd6b..571d5e3e715 100644 --- a/tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc +++ b/tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc @@ -519,11 +519,11 @@ StatusOr> Exporter::Convert( llvm::StringMap name_to_op; for (const auto& it : llvm::enumerate(graph_op.GetFetch().getOperands())) { // Skip control rets. - const int64 it_index = it.index(); - if (it_index >= num_data_results) break; + const int64 index = it.index(); + if (index >= num_data_results) break; // TODO(jpienaar): If there is a result index specified, ensure only one // and that it matches the result index of the op. - std::string orig_name(output_names[it.index()]); + std::string orig_name(output_names[index]); auto tensor_id = ParseTensorName(orig_name); auto name = LegalizeNodeName( llvm::StringRef(tensor_id.node().data(), tensor_id.node().size()));