[llvm] r355299 - [SubtargetFeatures] Don't call ApplyFeatureFlag if the feature name is '+help'
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 3 18:02:25 PST 2019
Author: ctopper
Date: Sun Mar 3 18:02:24 2019
New Revision: 355299
URL: http://llvm.org/viewvc/llvm-project?rev=355299&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/MC/SubtargetFeature.cpp
Modified: llvm/trunk/lib/MC/SubtargetFeature.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/SubtargetFeature.cpp?rev=355299&r1=355298&r2=355299&view=diff
==============================================================================
--- llvm/trunk/lib/MC/SubtargetFeature.cpp (original)
+++ llvm/trunk/lib/MC/SubtargetFeature.cpp Sun Mar 3 18:02:24 2019
@@ -232,8 +232,8 @@ SubtargetFeatures::getFeatureBits(String
// Check for help
if (Feature == "+help")
Help(CPUTable, FeatureTable);
-
- ApplyFeatureFlag(Bits, Feature, FeatureTable);
+ else
+ ApplyFeatureFlag(Bits, Feature, FeatureTable);
}
return Bits;
More information about the llvm-commits
mailing list