Skip to content

Commit 401ea89

Browse files
committed
1.11 opaque pointer fix
1 parent 05d589a commit 401ea89

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/llvm/transforms.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,11 @@ function nodecayed_phis!(mod::LLVM.Module)
944944
B = LLVM.IRBuilder()
945945
position!(B, v)
946946

947-
sPT = LLVM.PointerType(eltype(value_type(v)), 10)
947+
sPT = if !LLVM.is_opaque(value_type(v))
948+
LLVM.PointerType(eltype(value_type(v)), 10)
949+
else
950+
LLVM.PointerType(10)
951+
end
948952
vphi = phi!(B, sPT, "nondecay.vphi."*LLVM.name(v))
949953
ophi = phi!(B, value_type(offset), "nondecay.ophi"*LLVM.name(v))
950954
phicache[v] = (vphi, ophi)

0 commit comments

Comments
 (0)