summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/SubtargetFeature.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-03-04 02:02:24 +0000
committerCraig Topper <craig.topper@intel.com>2019-03-04 02:02:24 +0000
commitb306ef12f046353ea5bda4b3b77759e57909a0db (patch)
tree0efa64af51c1019fde4cb067f53c0b2f3bc4388a /llvm/lib/MC/SubtargetFeature.cpp
parenta761f9f4079acff4a3b1ace5e439d4c446a8db05 (diff)
downloadbcm5719-llvm-b306ef12f046353ea5bda4b3b77759e57909a0db.tar.gz
bcm5719-llvm-b306ef12f046353ea5bda4b3b77759e57909a0db.zip
[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
Diffstat (limited to 'llvm/lib/MC/SubtargetFeature.cpp')
-rw-r--r--llvm/lib/MC/SubtargetFeature.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/SubtargetFeature.cpp b/llvm/lib/MC/SubtargetFeature.cpp
index 84c743c5e33..9b774c1fab8 100644
--- a/llvm/lib/MC/SubtargetFeature.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud