18 #include "llvm/Config/llvm-config.h" 35 S.
split(Tmp,
',', -1,
false );
44 : (Enable ?
"+" :
"-") + String.
lower());
49 Split(Features, Initial);
53 return join(Features.begin(), Features.end(),
",");
57 for (
auto &
F : Features)
62 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void print(raw_ostream &OS) const
Prints feature string.
This class represents lattice values for constants.
void getDefaultSubtargetFeatures(const Triple &Triple)
Adds the default features for the specified target triple.
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds...
std::string getString() const
Returns features as a string.
static bool hasFlag(StringRef Feature)
Determine if a feature has a flag; '+' or '-'.
std::string join(IteratorT Begin, IteratorT End, StringRef Separator)
Joins the strings in the range [Begin, End), adding Separator between the elements.
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
void AddFeature(StringRef String, bool Enable=true)
Adds Features.
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
static void Split(std::vector< std::string > &V, StringRef S)
Splits a string of comma separated items in to a vector of strings.
VendorType getVendor() const
getVendor - Get the parsed vendor type of this triple.
Triple - Helper class for working with autoconf configuration names.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
LLVM_NODISCARD std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
SubtargetFeatures(StringRef Initial="")
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
LLVM_NODISCARD std::string lower() const
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.