| ... | ... | @@ -3113,13 +3113,18 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl_index: Decl.Index) SemaError!void { |
| 3113 | 3113 | } |
| 3114 | 3114 | } |
| 3115 | 3115 | |
| 3116 | | pub fn ensureFuncBodyAnalyzed(zcu: *Zcu, func_index: InternPool.Index) SemaError!void { |
| 3116 | pub fn ensureFuncBodyAnalyzed(zcu: *Zcu, maybe_coerced_func_index: InternPool.Index) SemaError!void { |
| 3117 | 3117 | const tracy = trace(@src()); |
| 3118 | 3118 | defer tracy.end(); |
| 3119 | 3119 | |
| 3120 | 3120 | const gpa = zcu.gpa; |
| 3121 | 3121 | const ip = &zcu.intern_pool; |
| 3122 | | const func = zcu.funcInfo(func_index); |
| 3122 | |
| 3123 | // We only care about the uncoerced function. |
| 3124 | // We need to do this for the "orphaned function" check below to be valid. |
| 3125 | const func_index = ip.unwrapCoercedFunc(maybe_coerced_func_index); |
| 3126 | |
| 3127 | const func = zcu.funcInfo(maybe_coerced_func_index); |
| 3123 | 3128 | const decl_index = func.owner_decl; |
| 3124 | 3129 | const decl = zcu.declPtr(decl_index); |
| 3125 | 3130 | |