Skip to content

Commit 91ef262

Browse files
committed
Restore the static_assert but checking against 'APFloat::Storage' instead of 'IEEEFloat'.
1 parent 05f6e29 commit 91ef262

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/include/llvm/ADT/APFloat.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,12 @@ 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

14791485
/// See friend declarations above.

0 commit comments

Comments
 (0)