Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander.nutz committed Aug 6, 2024
1 parent 4b2554d commit 0fb0492
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ir/ir.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>


#ifndef VX_BASE_TYPES
Expand Down Expand Up @@ -101,6 +102,8 @@ static vx_IrType* vx_IrType_heap(void) {

// TODO: remove cir checks and make sure fn called after cir type expand & MAKE TYPE EXPAND AWARE OF MEMBER ALIGN FOR UNIONS
static size_t vx_IrType_size(vx_IrType *ty) {
assert(ty != NULL);

size_t total = 0;

switch (ty->kind) {
Expand Down
2 changes: 1 addition & 1 deletion ir/lifetimes.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void vx_IrBlock_lifetimes(vx_IrBlock *block) {
block->as_root.vars[var].ll_lifetime = lt;
}

for (vx_IrOp *op = block->first; op->next != NULL; op = op->next) {
for (vx_IrOp *op = block->first; op; op = op->next) {
if (op->id == VX_IR_OP_PLACE) {
vx_IrVar var = vx_IrOp_param(op, VX_IR_NAME_VAR)->var;
block->as_root.vars[var].ever_placed = true;
Expand Down

0 comments on commit 0fb0492

Please sign in to comment.