diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-07-18 21:46:30 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-07-18 21:46:30 -0700 |
| commit | 9262b6076f38eb614fb45c1f69f125665f0fa8d9 (patch) | |
| tree | d7a5263287cc1c4c7ed9588ebba01c61c462b085 /src/InternPool.zig | |
| parent | c597ba32d930df0c2d5be846f3b14a19a5c440c5 (diff) | |
| download | zig-9262b6076f38eb614fb45c1f69f125665f0fa8d9.tar.gz zig-9262b6076f38eb614fb45c1f69f125665f0fa8d9.zip | |
Sema: fix generic function instances not respecting linksection
Diffstat (limited to 'src/InternPool.zig')
| -rw-r--r-- | src/InternPool.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig index 3e2077fd55..b8eaafceab 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -4705,6 +4705,7 @@ pub const GetFuncInstanceKey = struct { bare_return_type: Index, cc: std.builtin.CallingConvention, alignment: Alignment, + section: OptionalNullTerminatedString, is_noinline: bool, generic_owner: Index, inferred_error_set: bool, @@ -4782,6 +4783,7 @@ pub fn getFuncInstance(ip: *InternPool, gpa: Allocator, arg: GetFuncInstanceKey) func_extra_index, arg.generation, func_ty, + arg.section, ); } @@ -4911,6 +4913,7 @@ pub fn getFuncInstanceIes( func_extra_index, arg.generation, func_ty, + arg.section, ); } @@ -4922,6 +4925,7 @@ fn finishFuncInstance( func_extra_index: u32, generation: u32, func_ty: Index, + section: OptionalNullTerminatedString, ) Allocator.Error!Index { const fn_owner_decl = ip.declPtr(ip.funcDeclOwner(generic_owner)); const decl_index = try ip.createDecl(gpa, .{ @@ -4934,7 +4938,7 @@ fn finishFuncInstance( .ty = func_ty.toType(), .val = func_index.toValue(), .alignment = .none, - .@"linksection" = fn_owner_decl.@"linksection", + .@"linksection" = section, .@"addrspace" = fn_owner_decl.@"addrspace", .analysis = .complete, .deletion_flag = false, |
