qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit eb9fcece9e622712a60ad306ae83f4ac4a2a3571
parent 011dfc839d40c735fb63474aa6d5e1412b823a3b
Author: Quentin Carbonneaux <quentin@c9x.me>
Date:   Sun, 19 Mar 2023 07:38:24 +0100

naming nit

Diffstat:
Mall.h | 2+-
Mamd64/sysv.c | 2+-
Marm64/abi.c | 2+-
Mrega.c | 2+-
Mutil.c | 6+++---
5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/all.h b/all.h @@ -458,7 +458,7 @@ void freeall(void); void *vnew(ulong, size_t, Pool); void vfree(void *); void vgrow(void *, ulong); -void fmt(char *, char *, ...); +void strf(char[NString], char *, ...); uint32_t intern(char *); char *str(uint32_t); int argcls(Ins *, int); diff --git a/amd64/sysv.c b/amd64/sysv.c @@ -512,7 +512,7 @@ split(Fn *fn, Blk *b) idup(&bn->ins, curi, bn->nins); curi = &insb[NIns]; bn->visit = ++b->visit; - fmt(bn->name, "%s.%d", b->name, b->visit); + strf(bn->name, "%s.%d", b->name, b->visit); bn->loop = b->loop; bn->link = b->link; b->link = bn; diff --git a/arm64/abi.c b/arm64/abi.c @@ -547,7 +547,7 @@ split(Fn *fn, Blk *b) idup(&bn->ins, curi, bn->nins); curi = &insb[NIns]; bn->visit = ++b->visit; - fmt(bn->name, "%s.%d", b->name, b->visit); + strf(bn->name, "%s.%d", b->name, b->visit); bn->loop = b->loop; bn->link = b->link; b->link = bn; diff --git a/rega.c b/rega.c @@ -670,7 +670,7 @@ rega(Fn *fn) b1->link = blist; blist = b1; fn->nblk++; - fmt(b1->name, "%s_%s", b->name, s->name); + strf(b1->name, "%s_%s", b->name, s->name); b1->nins = &insb[NIns] - curi; stmov += b1->nins; stblk += 1; diff --git a/util.c b/util.c @@ -155,12 +155,12 @@ vgrow(void *vp, ulong len) } void -fmt(char *dst, char *s, ...) +strf(char str[NString], char *s, ...) { va_list ap; va_start(ap, s); - vsnprintf(dst, NString, s, ap); + vsnprintf(str, NString, s, ap); va_end(ap); } @@ -344,7 +344,7 @@ newtmp(char *prfx, int k, Fn *fn) vgrow(&fn->tmp, fn->ntmp); memset(&fn->tmp[t], 0, sizeof(Tmp)); if (prfx) - sprintf(fn->tmp[t].name, "%s.%d", prfx, ++n); + strf(fn->tmp[t].name, "%s.%d", prfx, ++n); fn->tmp[t].cls = k; fn->tmp[t].slot = -1; fn->tmp[t].nuse = +1;