X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=include%2Fllvm%2FMC%2FSubtargetFeature.h;h=ad7fec53ac3ec9dcbfc5e86fe16209fe9fa00de3;hp=d0735ccd9fa3179414314398457923a5d159ba85;hb=93681fa6c6c63f00090ae543b19c98c64e4e0c0a;hpb=1f0d177335eeaf26b4b3e006b7866141e9951254 diff --git a/include/llvm/MC/SubtargetFeature.h b/include/llvm/MC/SubtargetFeature.h index d0735ccd9fa..ad7fec53ac3 100644 --- a/include/llvm/MC/SubtargetFeature.h +++ b/include/llvm/MC/SubtargetFeature.h @@ -101,6 +101,12 @@ public: /// Adds the default features for the specified target triple. void getDefaultSubtargetFeatures(const Triple& Triple); + + /// Find KV in array using binary search. + /// T should be either SubtargetFeatureKV or SubtargetInfoKV + template + static const T *Find(StringRef Key, const T *Array, size_t Length, + const char* KeyType); }; } // End namespace llvm