@@ -1929,9 +1929,9 @@ SDValue X86TargetLowering::LowerFormalArguments(
19291929 }
19301930
19311931 if (CallingConv::PreserveNone == CallConv)
1932- for (unsigned I = 0 , E = Ins. size (); I != E; ++I ) {
1933- if (Ins[I] .Flags .isSwiftSelf () || Ins[I] .Flags .isSwiftAsync () ||
1934- Ins[I] .Flags .isSwiftError ()) {
1932+ for (const ISD::InputArg &In : Ins) {
1933+ if (In .Flags .isSwiftSelf () || In .Flags .isSwiftAsync () ||
1934+ In .Flags .isSwiftError ()) {
19351935 errorUnsupported (DAG, dl,
19361936 " Swift attributes can't be used with preserve_none" );
19371937 break ;
@@ -2421,9 +2421,8 @@ X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
24212421 // Build a sequence of copy-to-reg nodes chained together with token chain
24222422 // and glue operands which copy the outgoing args into registers.
24232423 SDValue InGlue;
2424- for (unsigned i = 0 , e = RegsToPass.size (); i != e; ++i) {
2425- Chain = DAG.getCopyToReg (Chain, dl, RegsToPass[i].first ,
2426- RegsToPass[i].second , InGlue);
2424+ for (const auto [Reg, N] : RegsToPass) {
2425+ Chain = DAG.getCopyToReg (Chain, dl, Reg, N, InGlue);
24272426 InGlue = Chain.getValue (1 );
24282427 }
24292428
@@ -2462,9 +2461,8 @@ X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
24622461
24632462 // Add argument registers to the end of the list so that they are known live
24642463 // into the call.
2465- for (unsigned i = 0 , e = RegsToPass.size (); i != e; ++i)
2466- Ops.push_back (DAG.getRegister (RegsToPass[i].first ,
2467- RegsToPass[i].second .getValueType ()));
2464+ for (const auto [Reg, N] : RegsToPass)
2465+ Ops.push_back (DAG.getRegister (Reg, N.getValueType ()));
24682466
24692467 // Add a register mask operand representing the call-preserved registers.
24702468 const uint32_t *Mask = [&]() {
@@ -2615,9 +2613,9 @@ X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
26152613 }
26162614
26172615 if (CallingConv::PreserveNone == CallConv)
2618- for (unsigned I = 0 , E = Outs. size (); I != E; ++I ) {
2619- if (Outs[I] .Flags .isSwiftSelf () || Outs[I] .Flags .isSwiftAsync () ||
2620- Outs[I] .Flags .isSwiftError ()) {
2616+ for (const ISD::OutputArg &Out : Outs) {
2617+ if (Out .Flags .isSwiftSelf () || Out .Flags .isSwiftAsync () ||
2618+ Out .Flags .isSwiftError ()) {
26212619 errorUnsupported (DAG, dl,
26222620 " Swift attributes can't be used with preserve_none" );
26232621 break ;
0 commit comments