mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Fix name mangling for @(private) entities
This commit is contained in:
@@ -6212,6 +6212,9 @@ String ir_mangle_name(irGen *s, Entity *e) {
|
|||||||
|
|
||||||
isize max_len = pkgn.len + 1 + name.len + 1;
|
isize max_len = pkgn.len + 1 + name.len + 1;
|
||||||
bool require_suffix_id = is_type_polymorphic(e->type, true);
|
bool require_suffix_id = is_type_polymorphic(e->type, true);
|
||||||
|
if (e->flags & EntityFlag_NotExported) {
|
||||||
|
require_suffix_id = true;
|
||||||
|
}
|
||||||
if (require_suffix_id) {
|
if (require_suffix_id) {
|
||||||
max_len += 21;
|
max_len += 21;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -516,6 +516,8 @@ String lb_mangle_name(lbModule *m, Entity *e) {
|
|||||||
require_suffix_id = true;
|
require_suffix_id = true;
|
||||||
} else if (is_blank_ident(e->token)) {
|
} else if (is_blank_ident(e->token)) {
|
||||||
require_suffix_id = true;
|
require_suffix_id = true;
|
||||||
|
}if (e->flags & EntityFlag_NotExported) {
|
||||||
|
require_suffix_id = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (require_suffix_id) {
|
if (require_suffix_id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user