@@ -27,9 +27,9 @@ Context() do ctx end
2727
2828@dispose ctx= Context () begin
2929 @test supports_typed_pointers (ctx) isa Bool
30- if LLVM. version () > v "15 "
30+ if LLVM. version () > v "17 "
3131 @test supports_typed_pointers (ctx) == false
32- else
32+ elseif LLVM . version () < v " 13 "
3333 @test supports_typed_pointers (ctx) == true
3434 end
3535end
9090 eltyp = LLVM. Int32Type (ctx)
9191
9292 ptrtyp = LLVM. PointerType (eltyp)
93- if supports_typed_ptrs
93+ if supports_typed_pointers (ctx)
9494 @test eltype (ptrtyp) == eltyp
9595 end
9696
545545 @testset " constant expressions" begin
546546
547547 # inline assembly
548- if supports_typed_ptrs
548+ if supports_typed_pointers (ctx)
549549 let
550550 ft = LLVM. FunctionType (LLVM. VoidType (ctx))
551551 asm = InlineAsm (ft, " nop" , " " , false )
587587 ce = f (val, other_val):: LLVM.Constant
588588 @check_ir ce " i32 84"
589589 end
590- if supports_typed_ptrs
590+ if supports_typed_pointers (ctx)
591591 for f in [const_udiv, const_sdiv]
592592 ce = f (val, other_val):: LLVM.Constant
593593 @check_ir ce " i32 21"
655655 @check_ir ce " float -4.200000e+01"
656656
657657 other_val = LLVM. ConstantFP (Float32 (2. ); ctx)
658- if supports_typed_ptrs
658+ if supports_typed_pointers (ctx)
659659 ce = const_fadd (val, other_val):: LLVM.Constant
660660 @check_ir ce " float 4.400000e+01"
661661
@@ -698,15 +698,15 @@ end
698698 @check_ir ce " i32 0"
699699
700700 ce = const_inttoptr (ce, value_type (ptr)):: LLVM.Constant
701- if supports_typed_ptrs
701+ if supports_typed_pointers (ctx)
702702 @check_ir ce " i32* null"
703703 else
704704 @check_ir ce " ptr null"
705705 end
706706 @test isempty (uses (ptr))
707707 for f in [const_addrspacecast, const_pointercast]
708708 ce = f (ptr, LLVM. PointerType (LLVM. Int32Type (ctx), 1 )):: LLVM.Constant
709- if supports_typed_ptrs
709+ if supports_typed_pointers (ctx)
710710 @check_ir ce " i32 addrspace(1)* addrspacecast (i32* null to i32 addrspace(1)*)"
711711 else
712712 @check_ir ce " ptr addrspace(1) addrspacecast (ptr null to ptr addrspace(1))"
@@ -1167,7 +1167,7 @@ end
11671167 fn = LLVM. Function (mod, intr)
11681168 @test fn isa LLVM. Function
11691169
1170- if supports_typed_ptrs
1170+ if supports_typed_pointers (ctx)
11711171 @test eltype (value_type (fn)) == ft
11721172 end
11731173 @test isintrinsic (fn)
@@ -1194,7 +1194,7 @@ end
11941194
11951195 fn = LLVM. Function (mod, intr, [LLVM. DoubleType (ctx)])
11961196 @test fn isa LLVM. Function
1197- if supports_typed_ptrs
1197+ if supports_typed_pointers (ctx)
11981198 @test eltype (value_type (fn)) == ft
11991199 end
12001200 @test isintrinsic (fn)
0 commit comments