mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Ensure panic functions are never stripped.
This commit is contained in:
committed by
Christoffer Lerno
parent
cfd21f8ca2
commit
0de47d7c83
@@ -261,6 +261,8 @@ static void assign_panicfn(void)
|
||||
error_exit("Expected panic function to have the signature fn void(String, String, String, uint).");
|
||||
}
|
||||
global_context.panic_var = decl;
|
||||
decl->no_strip = true;
|
||||
|
||||
if (active_target.no_stdlib) return;
|
||||
|
||||
const char *panicf = "std::core::builtin::panicf";
|
||||
@@ -275,6 +277,8 @@ static void assign_panicfn(void)
|
||||
return;
|
||||
}
|
||||
|
||||
panicf_decl->no_strip = true;
|
||||
|
||||
Type *panicf_fn_type = panicf_decl->type->canonical;
|
||||
if (panicf_decl->decl_kind != DECL_FUNC)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user