File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -700,18 +700,26 @@ end
700
700
701
701
Context () do ctx
702
702
LLVM. Module (" SomeModule" , ctx) do mod
703
- intr = Intrinsic (" llvm.sin" )
703
+ intr_ft = LLVM. FunctionType (LLVM. DoubleType (ctx), [LLVM. DoubleType (ctx)])
704
+ intr_fn = LLVM. Function (mod, " llvm.sin.f64" , intr_ft)
705
+ @test isintrinsic (intr_fn)
706
+
707
+ intr = Intrinsic (intr_fn)
704
708
@test isoverloaded (intr)
705
709
710
+ if LLVM. version () >= v " 9"
711
+ @test intr == Intrinsic (" llvm.sin" )
712
+ end
713
+
706
714
@test name (intr) == " llvm.sin"
707
715
@test name (intr, [LLVM. DoubleType (ctx)]) == " llvm.sin.f64"
708
716
709
717
ft = FunctionType (intr, [LLVM. DoubleType (ctx)])
718
+ @test ft isa FunctionType
710
719
@test return_type (ft) == LLVM. DoubleType (ctx)
711
- @test isempty (functions (mod))
712
720
713
721
fn = LLVM. Function (mod, intr, [LLVM. DoubleType (ctx)])
714
- @test first ( functions (mod)) == fn
722
+ @test fn isa LLVM . Function
715
723
@test eltype (llvmtype (fn)) == ft
716
724
@test isintrinsic (fn)
717
725
end
You can’t perform that action at this time.
0 commit comments