@@ -2716,7 +2716,7 @@ ParseStatus RISCVAsmParser::parseDirective(AsmToken DirectiveID) {
2716
2716
2717
2717
bool RISCVAsmParser::resetToArch (StringRef Arch, SMLoc Loc, std::string &Result,
2718
2718
bool FromOptionDirective) {
2719
- for (auto Feature : RISCVFeatureKV)
2719
+ for (auto & Feature : RISCVFeatureKV)
2720
2720
if (llvm::RISCVISAInfo::isSupportedExtensionFeature (Feature.Key ))
2721
2721
clearFeatureBits (Feature.Value , Feature.Key );
2722
2722
@@ -2735,7 +2735,7 @@ bool RISCVAsmParser::resetToArch(StringRef Arch, SMLoc Loc, std::string &Result,
2735
2735
}
2736
2736
auto &ISAInfo = *ParseResult;
2737
2737
2738
- for (auto Feature : RISCVFeatureKV)
2738
+ for (auto & Feature : RISCVFeatureKV)
2739
2739
if (ISAInfo->hasExtension (Feature.Key ))
2740
2740
setFeatureBits (Feature.Value , Feature.Key );
2741
2741
@@ -2857,7 +2857,7 @@ bool RISCVAsmParser::parseDirectiveOption() {
2857
2857
// It is invalid to disable an extension that there are other enabled
2858
2858
// extensions depend on it.
2859
2859
// TODO: Make use of RISCVISAInfo to handle this
2860
- for (auto Feature : RISCVFeatureKV) {
2860
+ for (auto & Feature : RISCVFeatureKV) {
2861
2861
if (getSTI ().hasFeature (Feature.Value ) &&
2862
2862
Feature.Implies .test (Ext->Value ))
2863
2863
return Error (Loc,
0 commit comments