@@ -1274,6 +1274,7 @@ fn fnProtoExpr(
12741274 .is_inferred_error = false ,
12751275 .is_test = false ,
12761276 .is_extern = false ,
1277+ .is_noinline = false ,
12771278 .noalias_bits = noalias_bits ,
12781279 });
12791280
@@ -3404,7 +3405,6 @@ fn fnDecl(
34043405 };
34053406 defer fn_gz .unstack ();
34063407
3407- // TODO: support noinline
34083408 const is_pub = fn_proto .visib_token != null ;
34093409 const is_export = blk : {
34103410 const maybe_export_token = fn_proto .extern_export_inline_token orelse break :blk false ;
@@ -3418,6 +3418,10 @@ fn fnDecl(
34183418 const maybe_inline_token = fn_proto .extern_export_inline_token orelse break :blk false ;
34193419 break :blk token_tags [maybe_inline_token ] == .keyword_inline ;
34203420 };
3421+ const is_noinline = blk : {
3422+ const maybe_noinline_token = fn_proto .extern_export_inline_token orelse break :blk false ;
3423+ break :blk token_tags [maybe_noinline_token ] == .keyword_noinline ;
3424+ };
34213425
34223426 const doc_comment_index = try astgen .docCommentAsString (fn_proto .firstToken ());
34233427
@@ -3625,6 +3629,7 @@ fn fnDecl(
36253629 .is_inferred_error = false ,
36263630 .is_test = false ,
36273631 .is_extern = true ,
3632+ .is_noinline = is_noinline ,
36283633 .noalias_bits = noalias_bits ,
36293634 });
36303635 } else func : {
@@ -3673,6 +3678,7 @@ fn fnDecl(
36733678 .is_inferred_error = is_inferred_error ,
36743679 .is_test = false ,
36753680 .is_extern = false ,
3681+ .is_noinline = is_noinline ,
36763682 .noalias_bits = noalias_bits ,
36773683 });
36783684 };
@@ -4108,6 +4114,7 @@ fn testDecl(
41084114 .is_inferred_error = true ,
41094115 .is_test = true ,
41104116 .is_extern = false ,
4117+ .is_noinline = false ,
41114118 .noalias_bits = 0 ,
41124119 });
41134120
@@ -10191,6 +10198,7 @@ const GenZir = struct {
1019110198 is_inferred_error : bool ,
1019210199 is_test : bool ,
1019310200 is_extern : bool ,
10201+ is_noinline : bool ,
1019410202 }) ! Zir.Inst.Ref {
1019510203 assert (args .src_node != 0 );
1019610204 const astgen = gz .astgen ;
@@ -10232,10 +10240,9 @@ const GenZir = struct {
1023210240 }
1023310241 const body_len = astgen .countBodyLenAfterFixups (body );
1023410242
10235- if (args .cc_ref != .none or args .lib_name != 0 or
10236- args .is_var_args or args .is_test or args .is_extern or
10237- args .align_ref != .none or args .section_ref != .none or
10238- args .addrspace_ref != .none or args .noalias_bits != 0 )
10243+ if (args .cc_ref != .none or args .lib_name != 0 or args .is_var_args or args .is_test or
10244+ args .is_extern or args .align_ref != .none or args .section_ref != .none or
10245+ args .addrspace_ref != .none or args .noalias_bits != 0 or args .is_noinline )
1023910246 {
1024010247 var align_body : []Zir.Inst.Index = &.{};
1024110248 var addrspace_body : []Zir.Inst.Index = &.{};
@@ -10268,6 +10275,7 @@ const GenZir = struct {
1026810275 .is_inferred_error = args .is_inferred_error ,
1026910276 .is_test = args .is_test ,
1027010277 .is_extern = args .is_extern ,
10278+ .is_noinline = args .is_noinline ,
1027110279 .has_lib_name = args .lib_name != 0 ,
1027210280 .has_any_noalias = args .noalias_bits != 0 ,
1027310281
0 commit comments