| ... | @@ -8459,9 +8459,7 @@ fn zirFunc( | ... | @@ -8459,9 +8459,7 @@ fn zirFunc( |
| 8459 | inst: Zir.Inst.Index, | 8459 | inst: Zir.Inst.Index, |
| 8460 | inferred_error_set: bool, | 8460 | inferred_error_set: bool, |
| 8461 | ) CompileError!Air.Inst.Ref { | 8461 | ) CompileError!Air.Inst.Ref { |
| 8462 | const tracy = trace(@src()); | 8462 | const mod = sema.mod; |
| 8463 | defer tracy.end(); | | |
| 8464 | | | |
| 8465 | const inst_data = sema.code.instructions.items(.data)[inst].pl_node; | 8463 | const inst_data = sema.code.instructions.items(.data)[inst].pl_node; |
| 8466 | const extra = sema.code.extraData(Zir.Inst.Func, inst_data.payload_index); | 8464 | const extra = sema.code.extraData(Zir.Inst.Func, inst_data.payload_index); |
| 8467 | const target = sema.mod.getTarget(); | 8465 | const target = sema.mod.getTarget(); |
| ... | @@ -8502,8 +8500,7 @@ fn zirFunc( | ... | @@ -8502,8 +8500,7 @@ fn zirFunc( |
| 8502 | // If this instruction has a body it means it's the type of the `owner_decl` | 8500 | // If this instruction has a body it means it's the type of the `owner_decl` |
| 8503 | // otherwise it's a function type without a `callconv` attribute and should | 8501 | // otherwise it's a function type without a `callconv` attribute and should |
| 8504 | // never be `.C`. | 8502 | // never be `.C`. |
| 8505 | // NOTE: revisit when doing #1717 | 8503 | const cc: std.builtin.CallingConvention = if (has_body and mod.declPtr(block.src_decl).is_exported) |
| 8506 | const cc: std.builtin.CallingConvention = if (sema.owner_decl.is_exported and has_body) | | |
| 8507 | .C | 8504 | .C |
| 8508 | else | 8505 | else |
| 8509 | .Unspecified; | 8506 | .Unspecified; |