================
@@ -331,15 +331,108 @@ bool MCSubtargetInfo::checkFeatures(StringRef FS) const {
            "Feature flags should start with '+' or '-'");
     const SubtargetFeatureKV *FeatureEntry =
         Find(SubtargetFeatures::StripFlag(F), ProcFeatures);
-    if (!FeatureEntry)
-      report_fatal_error(Twine("'") + F +
-                         "' is not a recognized feature for this target");
+    if (!FeatureEntry) {
+      reportFatalInternalError(Twine("'") + F +
+                               "' is not a recognized feature for this 
target");
+    }
 
     return FeatureBits.test(FeatureEntry->Value) ==
            SubtargetFeatures::isEnabled(F);
   });
 }
 
+static bool hasFeature(StringRef Feature, const FeatureBitset &FeatureBits,
+                       ArrayRef<SubtargetFeatureKV> ProcFeatures) {
+  bool ShouldBeEnabled = true;
+  if (!Feature.consume_front("+") && Feature.consume_front("-"))
+    ShouldBeEnabled = false;
+
+  const SubtargetFeatureKV *FeatureEntry = Find(Feature, ProcFeatures);
+  if (!FeatureEntry) {
+    report_fatal_error(Twine("'") + Feature +
----------------
topperc wrote:

report_fatal_error is deprecated. Use reportFatalUsageError or 
reportFatalInternalError.

https://github.com/llvm/llvm-project/pull/201470
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to