From 054b52c366256e7cde9c937006df944372e09acc Mon Sep 17 00:00:00 2001 From: Viktor Kutuzov Date: Sat, 21 Nov 2009 00:00:02 +0000 Subject: Added two SubtargetFeatures::AddFeatures methods, which accept a comma-separated string or already parsed command line parameters as input, and some code re-factoring to use these new methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89516 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/SubtargetFeature.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/llvm/Target/SubtargetFeature.h b/include/llvm/Target/SubtargetFeature.h index 38a3cc2fef..fb5dba1f6d 100644 --- a/include/llvm/Target/SubtargetFeature.h +++ b/include/llvm/Target/SubtargetFeature.h @@ -22,6 +22,7 @@ #include #include #include "llvm/ADT/Triple.h" +#include "llvm/Support/CommandLine.h" #include "llvm/System/DataTypes.h" namespace llvm { @@ -93,6 +94,12 @@ public: /// Adding Features. void AddFeature(const std::string &String, bool IsEnabled = true); + /// Add a set of features from the comma-separated string. + void AddFeatures(const std::string &String); + + /// Add a set of features from the parsed command line parameters. + void AddFeatures(const cl::list &List); + /// Get feature bits. uint32_t getBits(const SubtargetFeatureKV *CPUTable, size_t CPUTableSize, -- cgit v1.2.3