Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions llvm/include/llvm/IR/ConstantFPRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -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].
Expand Down
6 changes: 6 additions & 0 deletions llvm/lib/IR/ConstantFPRange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down