@@ -561,7 +561,7 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
561
561
// Ref: Table 22.1 in RISC-V User-Level ISA V2.2
562
562
char Baseline = Arch.front ();
563
563
// Skip the baseline.
564
- StringRef Exts = Arch.drop_front ();
564
+ Arch = Arch.drop_front ();
565
565
566
566
unsigned Major, Minor, ConsumeLength;
567
567
@@ -574,15 +574,15 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
574
574
case ' i' :
575
575
// Baseline is `i` or `e`
576
576
if (auto E = getExtensionVersion (
577
- StringRef (&Baseline, 1 ), Exts , Major, Minor, ConsumeLength,
577
+ StringRef (&Baseline, 1 ), Arch , Major, Minor, ConsumeLength,
578
578
EnableExperimentalExtension, ExperimentalExtensionVersionCheck))
579
579
return std::move (E);
580
580
581
581
ISAInfo->Exts [std::string (1 , Baseline)] = {Major, Minor};
582
582
break ;
583
583
case ' g' :
584
584
// g expands to extensions in RISCVGImplications.
585
- if (Arch.size () > 1 && isDigit (Arch[ 1 ] ))
585
+ if (! Arch.empty () && isDigit (Arch. front () ))
586
586
return getError (" version not supported for 'g'" );
587
587
588
588
// Versions for g are disallowed, and this was checked for previously.
@@ -602,18 +602,18 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
602
602
603
603
// Consume the base ISA version number and any '_' between rvxxx and the
604
604
// first extension
605
- Exts = Exts .drop_front (ConsumeLength);
605
+ Arch = Arch .drop_front (ConsumeLength);
606
606
607
- while (!Exts .empty ()) {
608
- if (Exts .front () == ' _' ) {
609
- if (Exts .size () == 1 || Exts [1 ] == ' _' )
607
+ while (!Arch .empty ()) {
608
+ if (Arch .front () == ' _' ) {
609
+ if (Arch .size () == 1 || Arch [1 ] == ' _' )
610
610
return getError (" extension name missing after separator '_'" );
611
- Exts = Exts .drop_front ();
611
+ Arch = Arch .drop_front ();
612
612
}
613
613
614
- size_t Idx = Exts .find (' _' );
615
- StringRef Ext = Exts .slice (0 , Idx);
616
- Exts = Exts .slice (Idx, StringRef::npos);
614
+ size_t Idx = Arch .find (' _' );
615
+ StringRef Ext = Arch .slice (0 , Idx);
616
+ Arch = Arch .slice (Idx, StringRef::npos);
617
617
618
618
do {
619
619
StringRef Name, Vers, Desc;
0 commit comments