Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
4 changes: 1 addition & 3 deletions llvm/include/llvm/ADT/APFloat.h
Original file line number Diff line number Diff line change
Expand Up @@ -1474,11 +1474,9 @@ class APFloat : public APFloatBase {
friend APFloat frexp(const APFloat &X, int &Exp, roundingMode RM);
friend IEEEFloat;
friend DoubleAPFloat;
friend class APFloatEBOChecker;
};

static_assert(sizeof(APFloat) == sizeof(detail::IEEEFloat),
"Empty base class optimization is not performed.");

/// See friend declarations above.
///
/// These additional declarations are required in order to compile LLVM with IBM
Expand Down
5 changes: 5 additions & 0 deletions llvm/lib/Support/APFloat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ enum class fltNanEncoding {
NegativeZero,
};

class APFloatEBOChecker {
static_assert(sizeof(APFloat) == sizeof(APFloat::U),
"Empty base class optimization is not performed.");
};

/* Represents floating point arithmetic semantics. */
struct fltSemantics {
/* The largest E such that 2^E is representable; this matches the
Expand Down
Loading