From 186b7095eeb84bec527d6d7ac9320776a8b78734 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Fri, 26 Apr 2024 18:31:18 -0700 Subject: Use hlt to implement noreturn --- decl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'decl.c') diff --git a/decl.c b/decl.c index 0749017..39c272d 100644 --- a/decl.c +++ b/decl.c @@ -1066,6 +1066,8 @@ decl(struct scope *s, struct func *f) s = funcscope; f = mkfunc(d, name, t, s); stmt(f, s); + if (d->u.func.isnoreturn) + funchlt(f); /* XXX: need to keep track of function in case a later declaration specifies extern */ if (!d->u.func.inlinedefn) emitfunc(f, d->linkage == LINKEXTERN); -- cgit v1.2.3