45 Triple TheTriple(TargetTriple);
50 const Target *TheTarget =
nullptr;
52 auto I = std::find_if(
58 *ErrorStr =
"No available targets are compatible with this -march, "
59 "see -version for the available targets.\n";
81 std::string FeaturesStr;
82 if (!MAttrs.
empty()) {
84 for (
unsigned i = 0; i != MAttrs.
size(); ++i)
102 assert(Target &&
"Could not allocate target machine!");
const_iterator end(StringRef path)
Get end iterator over path.
const char * getName() const
getName - Get the target name.
const FeatureBitset Features
const_iterator begin(StringRef path)
Get begin iterator over path.
static const Target * lookupTarget(const std::string &Triple, std::string &Error)
lookupTarget - Lookup a target based on a target triple.
void AddFeature(StringRef String, bool Enable=true)
Adding Features.
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const
TargetMachine * createTargetMachine(StringRef TT, StringRef CPU, StringRef Features, const TargetOptions &Options, Reloc::Model RM=Reloc::Default, CodeModel::Model CM=CodeModel::Default, CodeGenOpt::Level OL=CodeGenOpt::Default) const
createTargetMachine - Create a target specific machine implementation for the specified Triple...
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
static iterator_range< iterator > targets()
bool isiOS() const
Is this an iOS triple.
The instances of the Type class are immutable: once they are created, they are never changed...
const std::string & getTriple() const
cl::list< std::string > MAttrs("mattr", cl::CommaSeparated, cl::desc("Target specific attributes (-mattr=help for details)"), cl::value_desc("a1,+a2,-a3,..."))
void setTriple(const Twine &Str)
setTriple - Set all components to the new triple Str.
std::string getString() const
Features string accessors.
std::string getProcessTriple()
getProcessTriple() - Return an appropriate target triple for generating code to be loaded into the cu...
Triple - Helper class for working with autoconf configuration names.
cl::opt< std::string > MCPU("mcpu", cl::desc("Target a specific cpu type (-mcpu=help for details)"), cl::value_desc("cpu-name"), cl::init(""))
Module.h This file contains the declarations for the Module class.
static ArchType getArchTypeForLLVMName(StringRef Str)
getArchTypeForLLVMName - The canonical type for the given LLVM architecture name (e.g., "x86").
cl::opt< std::string > MArch("march", cl::desc("Architecture to generate code for (see --version)"))
Target - Wrapper for Target specific information.
SubtargetFeatures - Manages the enabling and disabling of subtarget specific features.
TargetMachine * selectTarget()
Primary interface to the complete machine description for the target machine.
StringRef - Represent a constant reference to a string, i.e.
void setArch(ArchType Kind)
setArch - Set the architecture (first) component of the triple to a known type.
bool empty() const
empty - Check if the string is empty.