From 6049fd1855b3871c9b21dd74ef93e4653aca1cd8 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 4 Mar 2019 02:02:24 +0000 Subject: [PATCH] [SubtargetFeatures] Don't call ApplyFeatureFlag if the feature name is '+help' Just print the help and stop. Otherwise we'll print a message about it not being a real feature name after printing the help text. llvm-svn: 355299 --- lib/MC/SubtargetFeature.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MC/SubtargetFeature.cpp b/lib/MC/SubtargetFeature.cpp index 84c743c5e33..9b774c1fab8 100644 --- a/lib/MC/SubtargetFeature.cpp +++ b/lib/MC/SubtargetFeature.cpp @@ -232,8 +232,8 @@ SubtargetFeatures::getFeatureBits(StringRef CPU, // Check for help if (Feature == "+help") Help(CPUTable, FeatureTable); - - ApplyFeatureFlag(Bits, Feature, FeatureTable); + else + ApplyFeatureFlag(Bits, Feature, FeatureTable); } return Bits;