Skip to content

Commit

Permalink
Compatibility with LLVM 5.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Mar 28, 2023
1 parent 3422eb3 commit c68865a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ LLVM = "929cbde3-209d-540e-8aea-75f648917ca0"
UnsafeAtomics = "013be700-e6cd-48c3-b4a1-df204f14c38f"

[compat]
LLVM = "4.12"
LLVM = "5"
UnsafeAtomics = "0.2"
julia = "1.6"
10 changes: 5 additions & 5 deletions src/atomics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ end
llvm_f, _ = create_function(eltyp, param_types)

# generate IR
@dispose builder = Builder(ctx) begin
@dispose builder = IRBuilder(ctx) begin
entry = BasicBlock(llvm_f, "entry"; ctx)
position!(builder, entry)

typed_ptr = bitcast!(builder, parameters(llvm_f)[1], T_typed_ptr)
ld = load!(builder, typed_ptr)
ld = load!(builder, eltyp, typed_ptr)
ordering!(ld, llvm_order)

if A != 0
Expand Down Expand Up @@ -208,7 +208,7 @@ end
llvm_f, _ = create_function(LLVM.VoidType(ctx), param_types)

# generate IR
@dispose builder = Builder(ctx) begin
@dispose builder = IRBuilder(ctx) begin
entry = BasicBlock(llvm_f, "entry"; ctx)
position!(builder, entry)

Expand Down Expand Up @@ -266,7 +266,7 @@ const AtomicRMWBinOpVal = Union{(Val{binop} for (_, _, binop) in binoptable)...}

llvm_f, _ = create_function(T_val, [T_ptr, T_val])

@dispose builder = Builder(ctx) begin
@dispose builder = IRBuilder(ctx) begin
entry = BasicBlock(llvm_f, "entry"; ctx)
position!(builder, entry)

Expand Down Expand Up @@ -405,7 +405,7 @@ end

llvm_f, _ = create_function(T_val, [T_ptr, T_val, T_val, T_success])

@dispose builder = Builder(ctx) begin
@dispose builder = IRBuilder(ctx) begin
entry = BasicBlock(llvm_f, "entry"; ctx)
position!(builder, entry)

Expand Down

0 comments on commit c68865a

Please sign in to comment.