mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
llvm: fix aliases not having linkage, visibility, etc set
This commit is contained in:
parent
2da956b84a
commit
abc8ddcfa9
1 changed files with 16 additions and 0 deletions
|
|
@ -1787,6 +1787,22 @@ pub const Object = struct {
|
|||
global_index.toConst(),
|
||||
);
|
||||
try alias_index.rename(exp_name, &o.builder);
|
||||
|
||||
const alias_global_index = alias_index.ptrConst(&o.builder).global;
|
||||
alias_global_index.setUnnamedAddr(.default, &o.builder);
|
||||
if (comp.config.dll_export_fns)
|
||||
alias_global_index.setDllStorageClass(.dllexport, &o.builder);
|
||||
alias_global_index.setLinkage(switch (first_export.opts.linkage) {
|
||||
.internal => unreachable,
|
||||
.strong => .external,
|
||||
.weak => .weak_odr,
|
||||
.link_once => .linkonce_odr,
|
||||
}, &o.builder);
|
||||
alias_global_index.setVisibility(switch (first_export.opts.visibility) {
|
||||
.default => .default,
|
||||
.hidden => .hidden,
|
||||
.protected => .protected,
|
||||
}, &o.builder);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue