[llvm-branch-commits] [mlir] [mlir][Parser] Deduplicate floating-point parsing functionality (PR #116172)
River Riddle via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Nov 17 22:14:18 PST 2024
================
@@ -99,6 +99,29 @@ FailureOr<APFloat> detail::parseFloatFromIntegerLiteral(
return APFloat(semantics, truncatedValue);
}
+FailureOr<APFloat>
+detail::parseFloatFromLiteral(function_ref<InFlightDiagnostic()> emitError,
----------------
River707 wrote:
Why not add this method to Parser instead of a floating function? All of the users seem to already have a parser instance? That would remove the need for the `emitError` function and make this a bit cleaner.
https://github.com/llvm/llvm-project/pull/116172
More information about the llvm-branch-commits
mailing list