Skip to content

Commit e0d2620

Browse files
committed
Update the EBO static_assert to dheck against APFloat::Storage instead of IEEEFloat.
1 parent d9c95ef commit e0d2620

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

llvm/include/llvm/ADT/APFloat.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,10 +1474,14 @@ class APFloat : public APFloatBase {
14741474
friend APFloat frexp(const APFloat &X, int &Exp, roundingMode RM);
14751475
friend IEEEFloat;
14761476
friend DoubleAPFloat;
1477+
friend class APFloatEBOChecker;
1478+
};
1479+
1480+
class APFloatEBOChecker {
1481+
static_assert(sizeof(APFloat) == sizeof(APFloat::U),
1482+
"Empty base class optimization is not performed.");
14771483
};
14781484

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

14821486
/// See friend declarations above.
14831487
///

0 commit comments

Comments
 (0)