================ @@ -670,10 +671,18 @@ static llvm::Triple computeTargetTriple(const Driver &D, if (Args.hasArg(options::OPT_march_EQ) || Args.hasArg(options::OPT_mcpu_EQ)) { StringRef ArchName = tools::riscv::getRISCVArch(Args, Target); - if (ArchName.starts_with_insensitive("rv32")) - Target.setArch(llvm::Triple::riscv32); - else if (ArchName.starts_with_insensitive("rv64")) - Target.setArch(llvm::Triple::riscv64); + auto ISAInfo = llvm::RISCVISAInfo::parseArchString( + ArchName, /*EnableExperimentalExtensions=*/true); + if (!ISAInfo) { ---------------- topperc wrote:
Use `errorToBool` to avoid the call to consumeError? https://github.com/llvm/llvm-project/pull/76387 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits