| ... | @@ -16492,6 +16492,9 @@ fn zirAlignOf(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air | ... | @@ -16492,6 +16492,9 @@ fn zirAlignOf(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air |
| 16492 | const inst_data = sema.code.instructions.items(.data)[inst].un_node; | 16492 | const inst_data = sema.code.instructions.items(.data)[inst].un_node; |
| 16493 | const operand_src: LazySrcLoc = .{ .node_offset_builtin_call_arg0 = inst_data.src_node }; | 16493 | const operand_src: LazySrcLoc = .{ .node_offset_builtin_call_arg0 = inst_data.src_node }; |
| 16494 | const ty = try sema.resolveType(block, operand_src, inst_data.operand); | 16494 | const ty = try sema.resolveType(block, operand_src, inst_data.operand); |
| | 16495 | if (ty.isNoReturn()) { |
| | 16496 | return sema.fail(block, operand_src, "no align available for type '{}'", .{ty.fmt(sema.mod)}); |
| | 16497 | } |
| 16495 | const target = sema.mod.getTarget(); | 16498 | const target = sema.mod.getTarget(); |
| 16496 | const val = try ty.lazyAbiAlignment(target, sema.arena); | 16499 | const val = try ty.lazyAbiAlignment(target, sema.arena); |
| 16497 | if (val.tag() == .lazy_align) { | 16500 | if (val.tag() == .lazy_align) { |