Skip to content

Commit

Permalink
Found more legacy code
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli committed Jan 14, 2025
1 parent dbf0859 commit 598be8f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions bootstrap_compiler/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,6 @@ static void codegen_instruction(const struct State *st, const CfInstruction *ins
f++;

LLVMValueRef val = LLVMBuildStructGEP2(st->builder, codegen_type(classtype), getop(0), f->union_id, ins->data.fieldname);
// This cast is needed in two cases:
// * All pointers are i8* in structs so we can do self-referencing classes.
// * This is how unions work.
val = LLVMBuildBitCast(st->builder, val, LLVMPointerType(codegen_type(f->type),0), "struct_member_cast");
setdest(val);
}
break;
Expand Down

0 comments on commit 598be8f

Please sign in to comment.