diff --git a/Project.toml b/Project.toml index 74db7be..9fcee6f 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/atomics.jl b/src/atomics.jl index a8078fd..49d52ed 100644 --- a/src/atomics.jl +++ b/src/atomics.jl @@ -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 @@ -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) @@ -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) @@ -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)