Skip to content

Commit 57e61be

Browse files
committed
unknown user
1 parent aec79d1 commit 57e61be

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/llvm/transforms.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2527,7 +2527,14 @@ function removeDeadArgs!(mod::LLVM.Module, tm::LLVM.TargetMachine, post_gc_fixup
25272527
)
25282528
for u in LLVM.uses(fn)
25292529
u = LLVM.user(u)
2530-
@assert isa(u, LLVM.CallInst)
2530+
if !isa(u, LLVM.CallInst)
2531+
msg = sprint() do io
2532+
println("Unknown user of fn: ", string(u))
2533+
println("fn: ", string(fn))
2534+
println("mod: ", string(parent(fn)))
2535+
end
2536+
throw(AssertionError(msg))
2537+
end
25312538
B = IRBuilder()
25322539
nextInst = LLVM.Instruction(LLVM.API.LLVMGetNextInstruction(u))
25332540
position!(B, nextInst)

0 commit comments

Comments
 (0)