| ... | ... | @@ -18010,6 +18010,7 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A |
| 18010 | 18010 | const section_src: LazySrcLoc = .{ .node_offset_fn_type_section = inst_data.src_node }; |
| 18011 | 18011 | const cc_src: LazySrcLoc = .{ .node_offset_fn_type_cc = inst_data.src_node }; |
| 18012 | 18012 | const ret_src: LazySrcLoc = .{ .node_offset_fn_type_ret_ty = inst_data.src_node }; |
| 18013 | const has_body = extra.data.body_len != 0; |
| 18013 | 18014 | |
| 18014 | 18015 | var extra_index: usize = extra.end; |
| 18015 | 18016 | |
| ... | ... | @@ -18019,8 +18020,11 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A |
| 18019 | 18020 | break :blk lib_name; |
| 18020 | 18021 | } else null; |
| 18021 | 18022 | |
| 18022 | | if ((extra.data.bits.has_align_body or extra.data.bits.has_align_ref) and sema.mod.getTarget().cpu.arch.isWasm()) { |
| 18023 | | return sema.fail(block, align_src, "'align' is not allowed on functions in wasm", .{}); |
| 18023 | if (has_body and |
| 18024 | (extra.data.bits.has_align_body or extra.data.bits.has_align_ref) and |
| 18025 | !target_util.supportsFunctionAlignment(target)) |
| 18026 | { |
| 18027 | return sema.fail(block, align_src, "target does not support function alignment", .{}); |
| 18024 | 18028 | } |
| 18025 | 18029 | |
| 18026 | 18030 | const @"align": ?u32 = if (extra.data.bits.has_align_body) blk: { |
| ... | ... | @@ -18162,7 +18166,6 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A |
| 18162 | 18166 | } else 0; |
| 18163 | 18167 | |
| 18164 | 18168 | var src_locs: Zir.Inst.Func.SrcLocs = undefined; |
| 18165 | | const has_body = extra.data.body_len != 0; |
| 18166 | 18169 | if (has_body) { |
| 18167 | 18170 | extra_index += extra.data.body_len; |
| 18168 | 18171 | src_locs = sema.code.extraData(Zir.Inst.Func.SrcLocs, extra_index).data; |