From 1d9e19fb3bb941cdc28e9d4c3063d3e213fd8312 Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 18 Mar 2026 11:33:41 +0100 Subject: Refactor: use typedefs and CamelCase for aggregate types Looks nicer --- src/ir_fold.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ir_fold.c') diff --git a/src/ir_fold.c b/src/ir_fold.c index a7b5c6e..9f0ff72 100644 --- a/src/ir_fold.c +++ b/src/ir_fold.c @@ -5,8 +5,8 @@ #ifdef __clang__ __attribute__((no_sanitize("float-cast-overflow"))) /* silence UBsan for float->int overflow */ #endif -static union ref -foldint(enum op op, enum irclass k, union ref lr, union ref rr) +static Ref +foldint(enum op op, enum irclass k, Ref lr, Ref rr) { vlong x; union { @@ -71,8 +71,8 @@ foldint(enum op op, enum irclass k, union ref lr, union ref rr) return mkintcon(k, x); } -static union ref -foldflt(enum op op, enum irclass k, union ref lr, union ref rr) +static Ref +foldflt(enum op op, enum irclass k, Ref lr, Ref rr) { int xi; double x, l = fltconval(lr), r = fltconval(rr); @@ -103,7 +103,7 @@ foldflt(enum op op, enum irclass k, union ref lr, union ref rr) } bool -foldbinop(union ref *to, enum op op, enum irclass k, union ref l, union ref r) +foldbinop(Ref *to, enum op op, enum irclass k, Ref l, Ref r) { if (!oisarith(op)) return 0; @@ -118,7 +118,7 @@ foldbinop(union ref *to, enum op op, enum irclass k, union ref l, union ref r) } bool -foldunop(union ref *to, enum op op, enum irclass k, union ref a) +foldunop(Ref *to, enum op op, enum irclass k, Ref a) { if (!isnumcon(a)) return 0; if (op != Ocopy && !oisarith(op)) -- cgit v1.2.3