From 566690b067c8175314fa657b899c99bccf96821c Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Mon, 4 Oct 2021 10:20:18 +0100 Subject: [APFloat] Remove BitWidth argument from getAllOnesValue There's no need to pass this in explicitly because it is trivially available from the semantics. --- llvm/lib/Support/APFloat.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Support/APFloat.cpp') diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index 780d1d0c..fc2b1ae 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/lib/Support/APFloat.cpp @@ -4864,9 +4864,8 @@ APFloat::opStatus APFloat::convert(const fltSemantics &ToSemantics, llvm_unreachable("Unexpected semantics"); } -APFloat APFloat::getAllOnesValue(const fltSemantics &Semantics, - unsigned BitWidth) { - return APFloat(Semantics, APInt::getAllOnes(BitWidth)); +APFloat APFloat::getAllOnesValue(const fltSemantics &Semantics) { + return APFloat(Semantics, APInt::getAllOnes(Semantics.sizeInBits)); } void APFloat::print(raw_ostream &OS) const { -- cgit v1.1