From 0e7a54e497553e5310881bd8a6b6e1b44e63e0b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20M=C3=BCller?= Date: Thu, 12 Sep 2024 14:49:24 +0200 Subject: [PATCH] [Substrait] Minor fixes in `importScalarFunction`. (NFC) (iree-org/iree-llvm-sandbox#860) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two minor improvements: (1) Use a `const` reference where there was a superfluous copy before (for a protobuf message) and (2) fix a typo in a comment. Signed-off-by: Ingo Müller --- lib/Target/SubstraitPB/Import.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/SubstraitPB/Import.cpp b/lib/Target/SubstraitPB/Import.cpp index ade8eb90..81569061 100644 --- a/lib/Target/SubstraitPB/Import.cpp +++ b/lib/Target/SubstraitPB/Import.cpp @@ -588,7 +588,7 @@ importScalarFunction(ImplicitLocOpBuilder builder, Location loc = UnknownLoc::get(context); // Import `output_type`. - proto::Type outputType = message.output_type(); + const proto::Type &outputType = message.output_type(); FailureOr mlirOutputType = importType(context, outputType); if (failed(mlirOutputType)) return failure(); @@ -614,7 +614,7 @@ importScalarFunction(ImplicitLocOpBuilder builder, operands.push_back((*expression)->getResult(0)); } - // Import `function_refernece` field. + // Import `function_reference` field. int32_t anchor = message.function_reference(); std::string calleeSymName = buildFuncSymName(anchor);