C backend: restore handling of .NoReturn in function signature

This commit is contained in:
Emily Bellows 2021-11-05 16:56:43 -04:00
parent e3d638a49e
commit 684d9532c5

View File

@ -451,6 +451,8 @@ pub const DeclGen = struct {
const return_ty = dg.decl.ty.fnReturnType();
if (return_ty.hasCodeGenBits()) {
try dg.renderType(w, return_ty);
} else if (return_ty.zigTypeTag() == .NoReturn) {
try w.writeAll("zig_noreturn void");
} else {
try w.writeAll("void");
}