[llvm] CodeGen: replace assertions with explicit errors for landinpad lowering (PR #71287)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 15:31:25 PST 2023
================
@@ -3166,7 +3166,9 @@ void SelectionDAGBuilder::visitLandingPad(const LandingPadInst &LP) {
SmallVector<EVT, 2> ValueVTs;
SDLoc dl = getCurSDLoc();
ComputeValueVTs(TLI, DAG.getDataLayout(), LP.getType(), ValueVTs);
- assert(ValueVTs.size() == 2 && "Only two-valued landingpads are supported");
+ if (ValueVTs.size() != 2) {
+ report_fatal_error("Only two-valued landingpads are supported");
+ }
----------------
arsenm wrote:
The verifier should enforce this, not fatal error in codegen
https://github.com/llvm/llvm-project/pull/71287
More information about the llvm-commits
mailing list