[llvm] [clang] [RISCV] Deduplicate RISCVISAInfo::toFeatures/toFeatureVector. NFC (PR #76942)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 4 22:12:27 PST 2024
================
@@ -42,9 +42,10 @@ static bool getArchFeatures(const Driver &D, StringRef Arch,
return false;
}
- (*ISAInfo)->toFeatures(
- Features, [&Args](const Twine &Str) { return Args.MakeArgString(Str); },
- /*AddAllExtensions=*/true);
+ const auto ISAInfoFeatures = (*ISAInfo)->toFeatures(/*AddAllExtension=*/true,
+ /*IgnoreUnknown=*/false);
+ Features.insert(Features.end(), ISAInfoFeatures.begin(),
+ ISAInfoFeatures.end());
----------------
lukel97 wrote:
Argh I was trying to be too clever and forgot that we need to call Args.MakeArgString, I've just replaced it with the push_back loop again.
https://github.com/llvm/llvm-project/pull/76942
More information about the llvm-commits
mailing list