mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-07 05:23:12 +00:00
Propagate @(link_section=<string>) to nested declarations
This commit is contained in:
@@ -2352,7 +2352,7 @@ gb_internal lbValue lb_emit_conv(lbProcedure *p, lbValue value, Type *t) {
|
||||
Type *elem = base_array_type(dst);
|
||||
lbValue e = lb_emit_conv(p, value, elem);
|
||||
lbAddr v = lb_add_local_generated(p, t, false);
|
||||
lbValue zero = lb_const_value(p->module, elem, exact_value_i64(0), true);
|
||||
lbValue zero = lb_const_value(p->module, elem, exact_value_i64(0), LB_CONST_CONTEXT_DEFAULT_ALLOW_LOCAL);
|
||||
for (i64 j = 0; j < dst->Matrix.column_count; j++) {
|
||||
for (i64 i = 0; i < dst->Matrix.row_count; i++) {
|
||||
lbValue ptr = lb_emit_matrix_epi(p, v.addr, i, j);
|
||||
@@ -2389,7 +2389,7 @@ gb_internal lbValue lb_emit_conv(lbProcedure *p, lbValue value, Type *t) {
|
||||
lb_emit_store(p, d, s);
|
||||
} else if (i == j) {
|
||||
lbValue d = lb_emit_matrix_epi(p, v.addr, i, j);
|
||||
lbValue s = lb_const_value(p->module, dst->Matrix.elem, exact_value_i64(1), true);
|
||||
lbValue s = lb_const_value(p->module, dst->Matrix.elem, exact_value_i64(1), LB_CONST_CONTEXT_DEFAULT_ALLOW_LOCAL);
|
||||
lb_emit_store(p, d, s);
|
||||
}
|
||||
}
|
||||
@@ -3493,8 +3493,7 @@ gb_internal lbValue lb_build_expr_internal(lbProcedure *p, Ast *expr) {
|
||||
|
||||
if (tv.value.kind != ExactValue_Invalid) {
|
||||
// NOTE(bill): Short on constant values
|
||||
bool allow_local = true;
|
||||
return lb_const_value(p->module, type, tv.value, allow_local);
|
||||
return lb_const_value(p->module, type, tv.value, LB_CONST_CONTEXT_DEFAULT_ALLOW_LOCAL);
|
||||
} else if (tv.mode == Addressing_Type) {
|
||||
// NOTE(bill, 2023-01-16): is this correct? I hope so at least
|
||||
return lb_typeid(m, tv.type);
|
||||
|
||||
Reference in New Issue
Block a user