mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Remove unused lbDefer kind
This commit is contained in:
@@ -204,7 +204,6 @@ enum lbDeferExitKind {
|
|||||||
|
|
||||||
enum lbDeferKind {
|
enum lbDeferKind {
|
||||||
lbDefer_Node,
|
lbDefer_Node,
|
||||||
lbDefer_Instr,
|
|
||||||
lbDefer_Proc,
|
lbDefer_Proc,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -215,8 +214,6 @@ struct lbDefer {
|
|||||||
lbBlock * block;
|
lbBlock * block;
|
||||||
union {
|
union {
|
||||||
Ast *stmt;
|
Ast *stmt;
|
||||||
// NOTE(bill): 'instr' will be copied every time to create a new one
|
|
||||||
lbValue instr;
|
|
||||||
struct {
|
struct {
|
||||||
lbValue deferred;
|
lbValue deferred;
|
||||||
Array<lbValue> result_as_args;
|
Array<lbValue> result_as_args;
|
||||||
|
|||||||
@@ -2172,10 +2172,6 @@ void lb_build_defer_stmt(lbProcedure *p, lbDefer const &d) {
|
|||||||
lb_start_block(p, b);
|
lb_start_block(p, b);
|
||||||
if (d.kind == lbDefer_Node) {
|
if (d.kind == lbDefer_Node) {
|
||||||
lb_build_stmt(p, d.stmt);
|
lb_build_stmt(p, d.stmt);
|
||||||
} else if (d.kind == lbDefer_Instr) {
|
|
||||||
// NOTE(bill): Need to make a new copy
|
|
||||||
LLVMValueRef instr = LLVMInstructionClone(d.instr.value);
|
|
||||||
LLVMInsertIntoBuilder(p->builder, instr);
|
|
||||||
} else if (d.kind == lbDefer_Proc) {
|
} else if (d.kind == lbDefer_Proc) {
|
||||||
lb_emit_call(p, d.proc.deferred, d.proc.result_as_args);
|
lb_emit_call(p, d.proc.deferred, d.proc.result_as_args);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user