Lines Matching refs:Feature
36 static inline bool hasFlag(StringRef Feature) { in hasFlag() argument
37 assert(!Feature.empty() && "Empty string"); in hasFlag()
39 char Ch = Feature[0]; in hasFlag()
45 static inline std::string StripFlag(StringRef Feature) { in StripFlag() argument
46 return hasFlag(Feature) ? Feature.substr(1) : Feature; in StripFlag()
50 static inline bool isEnabled(StringRef Feature) { in isEnabled() argument
51 assert(!Feature.empty() && "Empty string"); in isEnabled()
53 char Ch = Feature[0]; in isEnabled()
107 for (auto &Feature : FeatTable) in Help() local
108 errs() << format(" %-*s - %s.\n", MaxFeatLen, Feature.Key, Feature.Desc); in Help()
154 SubtargetFeatures::ToggleFeature(FeatureBitset &Bits, StringRef Feature, in ToggleFeature() argument
158 Find(StripFlag(Feature), FeatureTable); in ToggleFeature()
172 errs() << "'" << Feature << "' is not a recognized feature for this target" in ToggleFeature()
177 void SubtargetFeatures::ApplyFeatureFlag(FeatureBitset &Bits, StringRef Feature, in ApplyFeatureFlag() argument
179 assert(hasFlag(Feature)); in ApplyFeatureFlag()
183 Find(StripFlag(Feature), FeatureTable); in ApplyFeatureFlag()
187 if (isEnabled(Feature)) { in ApplyFeatureFlag()
199 errs() << "'" << Feature << "' is not a recognized feature for this target" in ApplyFeatureFlag()
243 for (const std::string &Feature : Features) { in getFeatureBits() local
245 if (Feature == "+help") in getFeatureBits()
248 ApplyFeatureFlag(Bits, Feature, FeatureTable); in getFeatureBits()