Skip to content

Commit 11530d9

Browse files
committed
Fix typed pointers determination.
1 parent 0407196 commit 11530d9

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

test/helpers/test.jl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ end
4141
module FileCheck
4242
import LLVM_jll
4343
import IOCapture
44+
using GPUCompiler, LLVM
4445
using InteractiveUtils
4546
using Test
4647

@@ -65,15 +66,8 @@ module FileCheck
6566
return Cmd(Cmd([filecheck_path]); env)
6667
end
6768

68-
const julia_typed_pointers = let
69-
ir = sprint(io->code_llvm(io, unsafe_load, Tuple{Ptr{Int}}))
70-
if occursin(r"load i64, i64\* .+, align 1", ir)
71-
true
72-
elseif occursin(r"load i64, ptr .+, align 1", ir)
73-
false
74-
else
75-
error("could not determine whether Julia uses typed pointers")
76-
end
69+
const julia_typed_pointers = JuliaContext() do ctx
70+
supports_typed_pointers(ctx)
7771
end
7872

7973
function filecheck(f, input)

0 commit comments

Comments
 (0)