Skip to content

Commit 0348de0

Browse files
committed
Rename Builder to IRBuilder.
1 parent 53cf34b commit 0348de0

22 files changed

+166
-166
lines changed

examples/Kaleidoscope/codegen.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
mutable struct CodeGen
22
ctx::LLVM.Context
3-
builder::LLVM.Builder
3+
builder::LLVM.IRBuilder
44
current_scope::CurrentScope
55
mod::LLVM.Module
66

77
CodeGen(ctx::LLVM.Context) =
88
new(
99
ctx,
10-
LLVM.Builder(ctx),
10+
LLVM.IRBuilder(ctx),
1111
CurrentScope(),
1212
LLVM.Module("KaleidoscopeModule"; ctx),
1313
)
@@ -23,7 +23,7 @@ Base.show(io::IO, cg::CodeGen) = print(io, "CodeGen")
2323

2424
function create_entry_block_allocation(cg::CodeGen, fn::LLVM.Function, varname::String)
2525
local alloc
26-
LLVM.@dispose builder=LLVM.Builder(cg.ctx) begin
26+
LLVM.@dispose builder=LLVM.IRBuilder(cg.ctx) begin
2727
# Set the builder at the start of the function
2828
entry_block = LLVM.entry(fn)
2929
if isempty(LLVM.instructions(entry_block))

examples/constrained.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ meta(::Type{FPExceptStrict}) = "fpexcept.strict"
4545
intrinsic_fun = LLVM.Function(mod, intrinsic, [typ])
4646
ftype = LLVM.FunctionType(intrinsic,[typ])
4747
# generate IR
48-
@dispose builder=Builder(ctx) begin
48+
@dispose builder=IRBuilder(ctx) begin
4949
entry = BasicBlock(llvm_f, "entry"; ctx)
5050
position!(builder, entry)
5151
val = call!(builder, ftype, intrinsic_fun,

examples/generated.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ end
2121
llvmf, _ = create_function(eltyp, paramtyps)
2222

2323
# generate IR
24-
@dispose builder=Builder(ctx) begin
24+
@dispose builder=IRBuilder(ctx) begin
2525
entry = BasicBlock(llvmf, "entry"; ctx)
2626
position!(builder, entry)
2727

examples/sum.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ end
2121
sum = LLVM.Function(mod, "sum", fun_type)
2222

2323
# generate IR
24-
@dispose builder=Builder(ctx) begin
24+
@dispose builder=IRBuilder(ctx) begin
2525
entry = BasicBlock(sum, "entry"; ctx)
2626
position!(builder, entry)
2727

examples/sum_integrated.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ end
1818
sum, _ = create_function(ret_type, param_types)
1919

2020
# generate IR
21-
@dispose builder=Builder(ctx) begin
21+
@dispose builder=IRBuilder(ctx) begin
2222
entry = BasicBlock(sum, "entry"; ctx)
2323
position!(builder, entry)
2424

examples/sum_orc.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function codegen!(mod::LLVM.Module, name, tm)
2222
sum = LLVM.Function(mod, name, ft)
2323

2424
# generate IR
25-
@dispose builder=Builder(ctx) begin
25+
@dispose builder=IRBuilder(ctx) begin
2626
entry = BasicBlock(sum, "entry"; ctx)
2727
position!(builder, entry)
2828

src/interop/asmcall.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export @asmcall
1212
inline_asm = InlineAsm(llvm_ft, String(asm), String(constraints), side_effects)
1313

1414
# generate IR
15-
@dispose builder=Builder(ctx) begin
15+
@dispose builder=IRBuilder(ctx) begin
1616
entry = BasicBlock(llvm_f, "entry"; ctx)
1717
position!(builder, entry)
1818

src/interop/pointer.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ using Core: LLVMPtr
2121
llvm_f, _ = create_function(eltyp, param_types)
2222

2323
# generate IR
24-
@dispose builder=Builder(ctx) begin
24+
@dispose builder=IRBuilder(ctx) begin
2525
entry = BasicBlock(llvm_f, "entry"; ctx)
2626
position!(builder, entry)
2727
if supports_typed_pointers(ctx)
@@ -59,7 +59,7 @@ end
5959
llvm_f, _ = create_function(LLVM.VoidType(ctx), param_types)
6060

6161
# generate IR
62-
@dispose builder=Builder(ctx) begin
62+
@dispose builder=IRBuilder(ctx) begin
6363
entry = BasicBlock(llvm_f, "entry"; ctx)
6464
position!(builder, entry)
6565
if supports_typed_pointers(ctx)
@@ -129,7 +129,7 @@ Base.signed(x::LLVMPtr) = Int(x)
129129
llvm_f, _ = create_function(T_dest, [T_src])
130130
mod = LLVM.parent(llvm_f)
131131

132-
@dispose builder=Builder(ctx) begin
132+
@dispose builder=IRBuilder(ctx) begin
133133
entry = BasicBlock(llvm_f, "entry"; ctx)
134134
position!(builder, entry)
135135

@@ -164,7 +164,7 @@ end
164164
llvm_f, _ = create_function(T_ret, T_args)
165165
mod = LLVM.parent(llvm_f)
166166

167-
@dispose builder=Builder(ctx) begin
167+
@dispose builder=IRBuilder(ctx) begin
168168
entry = BasicBlock(llvm_f, "entry"; ctx)
169169
position!(builder, entry)
170170

0 commit comments

Comments
 (0)