================ @@ -3127,6 +3142,32 @@ bool Sema::checkTargetClonesAttrString( /*IncludeLocallyStreaming=*/false)) return Diag(LiteralLoc, diag::err_sme_streaming_cannot_be_multiversioned); + } else if (TInfo.getTriple().isRISCV()) { + // Suppress warn_target_clone_mixed_values + HasCommas = false; + + // Only support arch=+ext,... syntax. + if (Str.starts_with("arch=+")) { + // parseTargetAttr will parse full version string, + // the following split Cur string is no longer interesting. ---------------- BeMg wrote:
For example: version string is `arch=+v,+m,+zbb` After split Cur string will be {"arch=+v", "+m", "+zbb"}, but parseTargetAttr accept the `arch=+v,+m,+zbb` as input. So here it only want to invoke parseTargetAttr once and early quit when second time. https://github.com/llvm/llvm-project/pull/99040 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits