aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_proc.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-08-19 15:03:10 +0100
committergingerBill <bill@gingerbill.org>2021-08-19 15:03:10 +0100
commit7845769d4b417fdd321740c5404016dbc3119d43 (patch)
tree1ae0d5fb26452ac044101a161d202f7b0135f6f2 /src/llvm_backend_proc.cpp
parent33239324b83c7a32471fe147c1539fb86ca48404 (diff)
Remove unused code
Diffstat (limited to 'src/llvm_backend_proc.cpp')
-rw-r--r--src/llvm_backend_proc.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/llvm_backend_proc.cpp b/src/llvm_backend_proc.cpp
index 03b052c71..9516f2e3d 100644
--- a/src/llvm_backend_proc.cpp
+++ b/src/llvm_backend_proc.cpp
@@ -179,8 +179,9 @@ lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool ignore_body)
TypeTuple *params = &pt->Proc.params->Tuple;
for (isize i = 0; i < pt->Proc.param_count; i++) {
Entity *e = params->variables[i];
- Type *original_type = e->type;
- if (e->kind != Entity_Variable) continue;
+ if (e->kind != Entity_Variable) {
+ continue;
+ }
if (i+1 == params->variables.count && pt->Proc.c_vararg) {
continue;
@@ -658,7 +659,6 @@ lbValue lb_emit_call_internal(lbProcedure *p, lbValue value, lbValue return_ptr,
{
LLVMTypeRef ftp = lb_type(p->module, value.type);
- LLVMTypeRef ft = LLVMGetElementType(ftp);
LLVMValueRef fn = value.value;
if (!lb_is_type_kind(LLVMTypeOf(value.value), LLVMFunctionTypeKind)) {
fn = LLVMBuildPointerCast(p->builder, fn, ftp, "");
@@ -1690,8 +1690,6 @@ lbValue lb_build_builtin_proc(lbProcedure *p, Ast *expr, TypeAndValue const &tv,
case BuiltinProc_atomic_cxchgweak_failacq:
case BuiltinProc_atomic_cxchgweak_acq_failrelaxed:
case BuiltinProc_atomic_cxchgweak_acqrel_failrelaxed: {
- Type *type = expr->tav.type;
-
lbValue address = lb_build_expr(p, ce->args[0]);
Type *elem = type_deref(address.type);
lbValue old_value = lb_build_expr(p, ce->args[1]);
@@ -1765,7 +1763,6 @@ lbValue lb_build_builtin_proc(lbProcedure *p, Ast *expr, TypeAndValue const &tv,
case BuiltinProc_fixed_point_mul_sat:
case BuiltinProc_fixed_point_div_sat:
{
- bool do_bswap = is_type_different_to_arch_endianness(tv.type);
Type *platform_type = integer_endian_type_to_platform_type(tv.type);
lbValue x = lb_emit_conv(p, lb_build_expr(p, ce->args[0]), platform_type);
@@ -2062,7 +2059,6 @@ lbValue lb_build_call_expr_internal(lbProcedure *p, Ast *expr) {
Type *at = a.type;
if (at->kind == Type_Tuple) {
for_array(i, at->Tuple.variables) {
- Entity *e = at->Tuple.variables[i];
lbValue v = lb_emit_struct_ev(p, a, cast(i32)i);
args[arg_index++] = v;
}