Skip to content

Commit

Permalink
[Substrait] Minor fixes in importScalarFunction. (NFC) (iree-org/ir…
Browse files Browse the repository at this point in the history
…ee-llvm-sandbox#860)

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 <[email protected]>
  • Loading branch information
ingomueller-net committed Oct 15, 2024
1 parent c06eba5 commit 05573a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Target/SubstraitPB/Import.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<mlir::Type> mlirOutputType = importType(context, outputType);
if (failed(mlirOutputType))
return failure();
Expand All @@ -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);

Expand Down

0 comments on commit 05573a3

Please sign in to comment.