Skip to content

Commit

Permalink
check LLVM version for builtin.module
Browse files Browse the repository at this point in the history
  • Loading branch information
jumerckx committed Jan 25, 2024
1 parent fd0fb71 commit 1ab11e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/ir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ end

@testset "Module construction from operation" begin
IR.context!(IR.Context()) do
op = builtin.module_(bodyRegion=IR.Region())
if LLVM.version() >= v"15"
op = builtin.module_(bodyRegion=IR.Region())
else
op = builtin.module_(body=IR.Region())
end
mod = IR.Module(op)
op = IR.get_operation(mod)

Expand Down

0 comments on commit 1ab11e4

Please sign in to comment.