diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-07-09 19:49:12 +0200 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-07-09 19:49:12 +0200 |
| commit | 40625b24e2f08a20cafefc10bf4d13db9a3a93cc (patch) | |
| tree | 7f51fb8e9017e1c40d254272835c9a8a387078a8 /src/check_expr.cpp | |
| parent | d43a2daa17c475fd126c4293f56fe4be83142b98 (diff) | |
fix optimization mode, cold, and disabled not being applied to poly procs
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 782f60fda..799650656 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -587,6 +587,16 @@ gb_internal bool find_or_generate_polymorphic_procedure(CheckerContext *old_c, E entity->file = base_entity->file; entity->pkg = base_entity->pkg; entity->flags = 0; + + entity->Procedure.optimization_mode = base_entity->Procedure.optimization_mode; + + if (base_entity->flags & EntityFlag_Cold) { + entity->flags |= EntityFlag_Cold; + } + if (base_entity->flags & EntityFlag_Disabled) { + entity->flags |= EntityFlag_Disabled; + } + d->entity = entity; AstFile *file = nullptr; |