[llvm] [llvm] Add format check for MCSubtargetFeatures (PR #180943)
Georgiy Samoylov via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 19 02:10:18 PST 2026
================
@@ -351,6 +351,31 @@ class Target {
/// InstrumentManager, if registered (default = nullptr).
InstrumentManagerCtorTy InstrumentManagerCtorFn = nullptr;
+ bool isValidFeatureListFormat(StringRef FeaturesString) const {
+ if (FeaturesString.empty())
+ return true;
+
+ llvm::SmallVector<llvm::StringRef, 8> Features;
+ FeaturesString.split(Features, ',', /*MaxSplit=*/-1, /*KeepEmpty=*/false);
+
+ if (Features.empty())
+ return false;
+
+ for (llvm::StringRef Feature : Features) {
----------------
sga-sc wrote:
No, no at all
https://github.com/llvm/llvm-project/pull/180943
More information about the llvm-commits
mailing list