diff options
author | Jay Foad <jay.foad@amd.com> | 2021-10-04 10:20:18 +0100 |
---|---|---|
committer | Jay Foad <jay.foad@amd.com> | 2021-10-04 11:32:16 +0100 |
commit | 566690b067c8175314fa657b899c99bccf96821c (patch) | |
tree | b02900a1d19503f866d8b52f50b6599a9a6100b1 /llvm/lib/IR/Constants.cpp | |
parent | 45f9795085ee0fe6fd23129d80aad5a2ea5026a0 (diff) | |
download | llvm-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.cpp | 3 |
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); } |