@@ -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
@@ -3389,7 +3390,6 @@ fn fnDecl(
33893390 };
33903391 defer fn_gz .unstack ();
33913392
3392- // TODO: support noinline
33933393 const is_pub = fn_proto .visib_token != null ;
33943394 const is_export = blk : {
33953395 const maybe_export_token = fn_proto .extern_export_inline_token orelse break :blk false ;
@@ -3403,6 +3403,10 @@ fn fnDecl(
34033403 const maybe_inline_token = fn_proto .extern_export_inline_token orelse break :blk false ;
34043404 break :blk token_tags [maybe_inline_token ] == .keyword_inline ;
34053405 };
3406+ const is_noinline = blk : {
3407+ const maybe_noinline_token = fn_proto .extern_export_inline_token orelse break :blk false ;
3408+ break :blk token_tags [maybe_noinline_token ] == .keyword_noinline ;
3409+ };
34063410
34073411 const doc_comment_index = try astgen .docCommentAsString (fn_proto .firstToken ());
34083412
@@ -3610,6 +3614,7 @@ fn fnDecl(
36103614 .is_inferred_error = false ,
36113615 .is_test = false ,
36123616 .is_extern = true ,
3617+ .is_noinline = is_noinline ,
36133618 .noalias_bits = noalias_bits ,
36143619 });
36153620 } else func : {
@@ -3658,6 +3663,7 @@ fn fnDecl(
36583663 .is_inferred_error = is_inferred_error ,
36593664 .is_test = false ,
36603665 .is_extern = false ,
3666+ .is_noinline = is_noinline ,
36613667 .noalias_bits = noalias_bits ,
36623668 });
36633669 };
@@ -4093,6 +4099,7 @@ fn testDecl(
40934099 .is_inferred_error = true ,
40944100 .is_test = true ,
40954101 .is_extern = false ,
4102+ .is_noinline = false ,
40964103 .noalias_bits = 0 ,
40974104 });
40984105
@@ -10175,6 +10182,7 @@ const GenZir = struct {
1017510182 is_inferred_error : bool ,
1017610183 is_test : bool ,
1017710184 is_extern : bool ,
10185+ is_noinline : bool ,
1017810186 }) ! Zir.Inst.Ref {
1017910187 assert (args .src_node != 0 );
1018010188 const astgen = gz .astgen ;
@@ -10216,10 +10224,9 @@ const GenZir = struct {
1021610224 }
1021710225 const body_len = astgen .countBodyLenAfterFixups (body );
1021810226
10219- if (args .cc_ref != .none or args .lib_name != 0 or
10220- args .is_var_args or args .is_test or args .is_extern or
10221- args .align_ref != .none or args .section_ref != .none or
10222- args .addrspace_ref != .none or args .noalias_bits != 0 )
10227+ if (args .cc_ref != .none or args .lib_name != 0 or args .is_var_args or args .is_test or
10228+ args .is_extern or args .align_ref != .none or args .section_ref != .none or
10229+ args .addrspace_ref != .none or args .noalias_bits != 0 or args .is_noinline )
1022310230 {
1022410231 var align_body : []Zir.Inst.Index = &.{};
1022510232 var addrspace_body : []Zir.Inst.Index = &.{};
@@ -10252,6 +10259,7 @@ const GenZir = struct {
1025210259 .is_inferred_error = args .is_inferred_error ,
1025310260 .is_test = args .is_test ,
1025410261 .is_extern = args .is_extern ,
10262+ .is_noinline = args .is_noinline ,
1025510263 .has_lib_name = args .lib_name != 0 ,
1025610264 .has_any_noalias = args .noalias_bits != 0 ,
1025710265
0 commit comments