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/IR/Constants.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/IR/Constants.cpp') diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp index 0f2f76e..30a5cae 100644 --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -408,8 +408,7 @@ Constant *Constant::getAllOnesValue(Type *Ty) { APInt::getAllOnes(ITy->getBitWidth())); if (Ty->isFloatingPointTy()) { - APFloat FL = APFloat::getAllOnesValue(Ty->getFltSemantics(), - Ty->getPrimitiveSizeInBits()); + APFloat FL = APFloat::getAllOnesValue(Ty->getFltSemantics()); return ConstantFP::get(Ty->getContext(), FL); } -- cgit v1.1