[PATCH] D58937: [Subtarget] Move SubtargetFeatureKV/SubtargetInfoKV from SubtargetFeature.h to MCSubtargetInfo.h. Move all code that operates on ProcFeatures and ProcDesc arrays to MCSubtargetInfo.
Andrea Di Biagio via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 03:21:20 PST 2019
andreadb added a comment.
LGTM.
================
Comment at: lib/MC/MCSubtargetInfo.cpp:60
+ ArrayRef<SubtargetFeatureKV> FeatureTable) {
+ assert(SubtargetFeatures::hasFlag(Feature));
+
----------------
Maybe add an error message to this assert. Something like "expected a valid feature flag".
================
Comment at: lib/MC/MCSubtargetInfo.cpp:153
+ if (Feature == "+help")
+ Help(ProcDesc, ProcFeatures);
+ else
----------------
Can there be repeated '+help' features?
If so, then we may potentially end up printing multiple "help" messages. That being said, it looks like this was how it worked even before your patch. So, I am okay if you don't change it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58937/new/
https://reviews.llvm.org/D58937
More information about the llvm-commits
mailing list