@@ -29,10 +29,11 @@ export DomTree, dominates
2929 ref:: API.LLVMDominatorTreeRef
3030end
3131
32- Base. unsafe_convert (:: Type{API.LLVMDominatorTreeRef} , domtree:: DomTree ) = domtree. ref
32+ Base. unsafe_convert (:: Type{API.LLVMDominatorTreeRef} , domtree:: DomTree ) =
33+ mark_use (domtree). ref
3334
34- DomTree (f:: Function ) = DomTree (API. LLVMCreateDominatorTree (f))
35- dispose (domtree:: DomTree ) = API. LLVMDisposeDominatorTree ( domtree)
35+ DomTree (f:: Function ) = mark_alloc ( DomTree (API. LLVMCreateDominatorTree (f) ))
36+ dispose (domtree:: DomTree ) = mark_dispose ( API. LLVMDisposeDominatorTree, domtree)
3637
3738function dominates (domtree:: DomTree , A:: Instruction , B:: Instruction )
3839 API. LLVMDominatorTreeInstructionDominates (domtree, A, B) |> Bool
@@ -48,10 +49,11 @@ export PostDomTree, dominates
4849end
4950
5051Base. unsafe_convert (:: Type{API.LLVMPostDominatorTreeRef} , postdomtree:: PostDomTree ) =
51- postdomtree. ref
52+ mark_use ( postdomtree) . ref
5253
53- PostDomTree (f:: Function ) = PostDomTree (API. LLVMCreatePostDominatorTree (f))
54- dispose (postdomtree:: PostDomTree ) = API. LLVMDisposePostDominatorTree (postdomtree)
54+ PostDomTree (f:: Function ) = mark_alloc (PostDomTree (API. LLVMCreatePostDominatorTree (f)))
55+ dispose (postdomtree:: PostDomTree ) =
56+ mark_dispose (API. LLVMDisposePostDominatorTree, postdomtree)
5557
5658function dominates (postdomtree:: PostDomTree , A:: Instruction , B:: Instruction )
5759 API. LLVMPostDominatorTreeInstructionDominates (postdomtree, A, B) |> Bool
0 commit comments