@@ -29,10 +29,11 @@ export DomTree, dominates
29
29
ref:: API.LLVMDominatorTreeRef
30
30
end
31
31
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
33
34
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)
36
37
37
38
function dominates (domtree:: DomTree , A:: Instruction , B:: Instruction )
38
39
API. LLVMDominatorTreeInstructionDominates (domtree, A, B) |> Bool
@@ -48,10 +49,11 @@ export PostDomTree, dominates
48
49
end
49
50
50
51
Base. unsafe_convert (:: Type{API.LLVMPostDominatorTreeRef} , postdomtree:: PostDomTree ) =
51
- postdomtree. ref
52
+ mark_use ( postdomtree) . ref
52
53
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)
55
57
56
58
function dominates (postdomtree:: PostDomTree , A:: Instruction , B:: Instruction )
57
59
API. LLVMPostDominatorTreeInstructionDominates (postdomtree, A, B) |> Bool
0 commit comments