From 78810c23751b44a7f3403663e213c3da25a30eb6 Mon Sep 17 00:00:00 2001 From: Billy Moses Date: Wed, 16 Oct 2024 17:46:49 -0500 Subject: [PATCH] Improve newstructt err --- src/jlrt.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/jlrt.jl b/src/jlrt.jl index 70b6fb2ad3..8338986e19 100644 --- a/src/jlrt.jl +++ b/src/jlrt.jl @@ -285,7 +285,9 @@ end function val_from_byref_if_mixed(B::LLVM.IRBuilder, @nospecialize(oval::LLVM.Value), @nospecialize(val::LLVM.Value)) legal, TT, _ = abs_typeof(oval) - @assert legal + if !legal + throw(AssertionError("Could not determine type of value within jl_newstructt arg: $(string(oval))")) + end world = enzyme_extract_world(LLVM.parent(position(B))) act = active_reg_inner(TT, (), world) if act == ActiveState || act == MixedState @@ -330,4 +332,4 @@ function byref_from_val_if_mixed(B::LLVM.IRBuilder, @nospecialize(val::LLVM.Valu else return val end -end \ No newline at end of file +end