Skip to content

Commit

Permalink
Improve shadow error message (#1971)
Browse files Browse the repository at this point in the history
* Improve shadow error message

* Update compiler.jl
  • Loading branch information
wsmoses authored Oct 16, 2024
1 parent b80735e commit 68d9d31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2798,7 +2798,9 @@ function shadow_alloc_rewrite(V::LLVM.API.LLVMValueRef, gutils::API.EnzymeGradie
fn = LLVM.parent(LLVM.parent(V))
world = enzyme_extract_world(fn)
has, Ty, byref = abs_typeof(V)
@assert has
if !has
throw(AssertionError("Allocation could not have its type statically determined $(string(V))"))
end
rt = active_reg_inner(Ty, (), world)
if rt == ActiveState || rt == MixedState
B = LLVM.IRBuilder()
Expand Down

0 comments on commit 68d9d31

Please sign in to comment.