aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2021-10-04 10:20:18 +0100
committerJay Foad <jay.foad@amd.com>2021-10-04 11:32:16 +0100
commit566690b067c8175314fa657b899c99bccf96821c (patch)
treeb02900a1d19503f866d8b52f50b6599a9a6100b1 /llvm/lib/IR/Constants.cpp
parent45f9795085ee0fe6fd23129d80aad5a2ea5026a0 (diff)
downloadllvm-566690b067c8175314fa657b899c99bccf96821c.zip
llvm-566690b067c8175314fa657b899c99bccf96821c.tar.gz
llvm-566690b067c8175314fa657b899c99bccf96821c.tar.bz2
[APFloat] Remove BitWidth argument from getAllOnesValue
There's no need to pass this in explicitly because it is trivially available from the semantics.
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r--llvm/lib/IR/Constants.cpp3
1 files changed, 1 insertions, 2 deletions
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);
}