[llvm] [llvm] Add format check for MCSubtargetFeatures (PR #180943)
Georgiy Samoylov via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 19 02:09:46 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) {
+ if (Feature.empty())
----------------
sga-sc wrote:
Thank you for your comment, this check was redundant
https://github.com/llvm/llvm-project/pull/180943
More information about the llvm-commits
mailing list