Skip to content

Commit 23f41dd

Browse files
committed
make invalid constexpr and fix initalizer
1 parent d6fb785 commit 23f41dd

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

llvm/include/llvm/ADT/FloatingPointModeUtils.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,7 @@ fcmpImpliesClass(CmpInst::Predicate Pred, DenormalMode Mode, ValueTy LHS,
5252
FPClassTest RHSClass, LookThroughFnTy LookThroughFn) {
5353
assert(RHSClass != fcNone);
5454

55-
ValueTy Invalid;
56-
if constexpr (std::is_pointer_v<ValueTy>) {
57-
Invalid = nullptr;
58-
} else {
59-
Invalid = ValueTy();
60-
}
61-
55+
constexpr ValueTy Invalid = {};
6256
ValueTy Src = LHS;
6357

6458
if (Pred == FCmpInst::FCMP_TRUE)

0 commit comments

Comments
 (0)