45 Triple TheTriple(TargetTriple);
50 const Target *TheTarget = 0;
54 if (MArch == it->getName()) {
62 *ErrorStr =
"No available targets are compatible with this -march, "
63 "see -version for the available targets.\n";
83 std::string FeaturesStr;
84 if (!MAttrs.
empty()) {
86 for (
unsigned i = 0; i != MAttrs.
size(); ++i)
105 assert(Target &&
"Could not allocate target machine!");
static const Target * lookupTarget(const std::string &Triple, std::string &Error)
const std::string & getTargetTriple() const
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
bool isiOS() const
Is this an iOS triple.
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()
void AddFeature(const StringRef String, bool IsEnabled=true)
Adding Features.
TargetMachine * createTargetMachine(StringRef Triple, StringRef CPU, StringRef Features, const TargetOptions &Options, Reloc::Model RM=Reloc::Default, CodeModel::Model CM=CodeModel::Default, CodeGenOpt::Level OL=CodeGenOpt::Default) const
cl::opt< std::string > MCPU("mcpu", cl::desc("Target a specific cpu type (-mcpu=help for details)"), cl::value_desc("cpu-name"), cl::init(""))
static ArchType getArchTypeForLLVMName(StringRef Str)
cl::opt< std::string > MArch("march", cl::desc("Architecture to generate code for (see --version)"))
TargetMachine * selectTarget()
void setArch(ArchType Kind)
bool empty() const
empty - Check if the string is empty.