| ... | @@ -558,14 +558,14 @@ pub const Decl = struct { | ... | @@ -558,14 +558,14 @@ pub const Decl = struct { |
| 558 | if (!decl.has_align) return .none; | 558 | if (!decl.has_align) return .none; |
| 559 | assert(decl.zir_decl_index != 0); | 559 | assert(decl.zir_decl_index != 0); |
| 560 | const zir = decl.getFileScope().zir; | 560 | const zir = decl.getFileScope().zir; |
| 561 | return @intToEnum(Zir.Inst.Ref, zir.extra[decl.zir_decl_index + 7]); | 561 | return @intToEnum(Zir.Inst.Ref, zir.extra[decl.zir_decl_index + 8]); |
| 562 | } | 562 | } |
| 563 | | 563 | |
| 564 | pub fn zirLinksectionRef(decl: Decl) Zir.Inst.Ref { | 564 | pub fn zirLinksectionRef(decl: Decl) Zir.Inst.Ref { |
| 565 | if (!decl.has_linksection_or_addrspace) return .none; | 565 | if (!decl.has_linksection_or_addrspace) return .none; |
| 566 | assert(decl.zir_decl_index != 0); | 566 | assert(decl.zir_decl_index != 0); |
| 567 | const zir = decl.getFileScope().zir; | 567 | const zir = decl.getFileScope().zir; |
| 568 | const extra_index = decl.zir_decl_index + 7 + @boolToInt(decl.has_align); | 568 | const extra_index = decl.zir_decl_index + 8 + @boolToInt(decl.has_align); |
| 569 | return @intToEnum(Zir.Inst.Ref, zir.extra[extra_index]); | 569 | return @intToEnum(Zir.Inst.Ref, zir.extra[extra_index]); |
| 570 | } | 570 | } |
| 571 | | 571 | |
| ... | @@ -573,7 +573,7 @@ pub const Decl = struct { | ... | @@ -573,7 +573,7 @@ pub const Decl = struct { |
| 573 | if (!decl.has_linksection_or_addrspace) return .none; | 573 | if (!decl.has_linksection_or_addrspace) return .none; |
| 574 | assert(decl.zir_decl_index != 0); | 574 | assert(decl.zir_decl_index != 0); |
| 575 | const zir = decl.getFileScope().zir; | 575 | const zir = decl.getFileScope().zir; |
| 576 | const extra_index = decl.zir_decl_index + 7 + @boolToInt(decl.has_align) + 1; | 576 | const extra_index = decl.zir_decl_index + 8 + @boolToInt(decl.has_align) + 1; |
| 577 | return @intToEnum(Zir.Inst.Ref, zir.extra[extra_index]); | 577 | return @intToEnum(Zir.Inst.Ref, zir.extra[extra_index]); |
| 578 | } | 578 | } |
| 579 | | 579 | |