diff --git a/llvm/include/llvm/IR/ConstantFPRange.h b/llvm/include/llvm/IR/ConstantFPRange.h index e772095a266cc..577a46fa91570 100644 --- a/llvm/include/llvm/IR/ConstantFPRange.h +++ b/llvm/include/llvm/IR/ConstantFPRange.h @@ -59,6 +59,11 @@ class [[nodiscard]] ConstantFPRange { /// Initialize a range to hold the single specified value. LLVM_ABI explicit ConstantFPRange(const APFloat &Value); + LLVM_ABI ConstantFPRange(const ConstantFPRange &Other); + LLVM_ABI ConstantFPRange(ConstantFPRange &&Other); + LLVM_ABI ConstantFPRange &operator=(const ConstantFPRange &Other); + LLVM_ABI ConstantFPRange &operator=(ConstantFPRange &&Other); + /// Initialize a range of values explicitly. /// Note: If \p LowerVal is greater than \p UpperVal, please use the canonical /// form [Inf, -Inf]. diff --git a/llvm/lib/IR/ConstantFPRange.cpp b/llvm/lib/IR/ConstantFPRange.cpp index 5b8768601928e..5f05c51158d01 100644 --- a/llvm/lib/IR/ConstantFPRange.cpp +++ b/llvm/lib/IR/ConstantFPRange.cpp @@ -57,6 +57,12 @@ ConstantFPRange::ConstantFPRange(const APFloat &Value) } } +ConstantFPRange::ConstantFPRange(const ConstantFPRange &Other) = default; +ConstantFPRange::ConstantFPRange(ConstantFPRange &&Other) = default; +ConstantFPRange & +ConstantFPRange::operator=(const ConstantFPRange &Other) = default; +ConstantFPRange &ConstantFPRange::operator=(ConstantFPRange &&Other) = default; + // We treat that -0 is less than 0 here. static APFloat::cmpResult strictCompare(const APFloat &LHS, const APFloat &RHS) {