Skip to content

Commit 78fd3c2

Browse files
committed
replace llvm_unreachable with assertion
1 parent 0efd43e commit 78fd3c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18709,9 +18709,9 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
1870918709
retType = llvm::VectorType::get(
1871018710
retType, ElementCount::getFixed(XVecTy->getNumElements()));
1871118711
}
18712-
if (!E->getArg(0)->getType()->hasFloatingRepresentation() &&
18713-
!E->getArg(0)->getType()->hasSignedIntegerRepresentation())
18714-
llvm_unreachable("sign operand must have a float or int representation");
18712+
assert((E->getArg(0)->getType()->hasFloatingRepresentation() ||
18713+
E->getArg(0)->getType()->hasSignedIntegerRepresentation()) &&
18714+
"sign operand must have a float or int representation");
1871518715

1871618716
return Builder.CreateIntrinsic(
1871718717
retType, CGM.getHLSLRuntime().getSignIntrinsic(),

0 commit comments

Comments
 (0)