2009-04-01 21:53:23 +00:00
|
|
|
//===-- llvm/ADT/Triple.h - Target triple helper class ----------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_ADT_TRIPLE_H
|
|
|
|
#define LLVM_ADT_TRIPLE_H
|
|
|
|
|
2009-07-26 03:31:47 +00:00
|
|
|
#include "llvm/ADT/StringRef.h"
|
2009-04-01 21:53:23 +00:00
|
|
|
#include <string>
|
|
|
|
|
2009-08-26 05:00:16 +00:00
|
|
|
// Some system headers or GCC predefined macros conflict with identifiers in
|
|
|
|
// this file. Undefine them here.
|
|
|
|
#undef mips
|
|
|
|
#undef sparc
|
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
namespace llvm {
|
2009-07-26 03:31:47 +00:00
|
|
|
class StringRef;
|
|
|
|
class Twine;
|
2009-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
/// Triple - Helper class for working with target triples.
|
|
|
|
///
|
2010-08-12 11:31:39 +00:00
|
|
|
/// Target triples are strings in the canonical form:
|
2009-04-01 21:53:23 +00:00
|
|
|
/// ARCHITECTURE-VENDOR-OPERATING_SYSTEM
|
|
|
|
/// or
|
|
|
|
/// ARCHITECTURE-VENDOR-OPERATING_SYSTEM-ENVIRONMENT
|
|
|
|
///
|
|
|
|
/// This class is used for clients which want to support arbitrary
|
|
|
|
/// target triples, but also want to implement certain special
|
|
|
|
/// behavior for particular targets. This class isolates the mapping
|
|
|
|
/// from the components of the target triple to well known IDs.
|
|
|
|
///
|
2009-08-18 19:26:55 +00:00
|
|
|
/// At its core the Triple class is designed to be a wrapper for a triple
|
2010-08-12 11:31:39 +00:00
|
|
|
/// string; the constructor does not change or normalize the triple string.
|
|
|
|
/// Clients that need to handle the non-canonical triples that users often
|
|
|
|
/// specify should use the normalize method.
|
2009-08-18 19:26:55 +00:00
|
|
|
///
|
2010-08-12 11:31:39 +00:00
|
|
|
/// See autoconf/config.guess for a glimpse into what triples look like in
|
2009-08-18 19:26:55 +00:00
|
|
|
/// practice.
|
2009-04-01 21:53:23 +00:00
|
|
|
class Triple {
|
|
|
|
public:
|
|
|
|
enum ArchType {
|
|
|
|
UnknownArch,
|
2010-11-13 04:17:15 +00:00
|
|
|
|
2009-08-02 19:41:20 +00:00
|
|
|
alpha, // Alpha: alpha
|
2009-08-18 04:51:26 +00:00
|
|
|
arm, // ARM; arm, armv.*, xscale
|
2009-08-02 19:41:20 +00:00
|
|
|
bfin, // Blackfin: bfin
|
|
|
|
cellspu, // CellSPU: spu, cellspu
|
|
|
|
mips, // MIPS: mips, mipsallegrex
|
|
|
|
mipsel, // MIPSEL: mipsel, mipsallegrexel, psp
|
2009-08-18 13:50:28 +00:00
|
|
|
msp430, // MSP430: msp430
|
2009-08-02 19:41:20 +00:00
|
|
|
ppc, // PPC: powerpc
|
2009-11-19 11:59:00 +00:00
|
|
|
ppc64, // PPC64: powerpc64, ppu
|
2009-08-02 19:41:20 +00:00
|
|
|
sparc, // Sparc: sparc
|
2010-02-04 06:34:01 +00:00
|
|
|
sparcv9, // Sparcv9: Sparcv9
|
2009-08-02 19:41:20 +00:00
|
|
|
systemz, // SystemZ: s390x
|
2009-08-19 20:46:03 +00:00
|
|
|
tce, // TCE (http://tce.cs.tut.fi/): tce
|
2009-08-02 19:41:20 +00:00
|
|
|
thumb, // Thumb: thumb, thumbv.*
|
|
|
|
x86, // X86: i[3-9]86
|
|
|
|
x86_64, // X86-64: amd64, x86_64
|
|
|
|
xcore, // XCore: xcore
|
2010-02-23 19:15:24 +00:00
|
|
|
mblaze, // MBlaze: mblaze
|
2011-04-20 15:37:17 +00:00
|
|
|
ptx32, // PTX: ptx (32-bit)
|
|
|
|
ptx64, // PTX: ptx (64-bit)
|
2009-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
InvalidArch
|
|
|
|
};
|
|
|
|
enum VendorType {
|
|
|
|
UnknownVendor,
|
|
|
|
|
2010-11-13 04:17:15 +00:00
|
|
|
Apple,
|
2011-03-15 21:51:56 +00:00
|
|
|
PC,
|
|
|
|
SCEI
|
2009-04-01 21:53:23 +00:00
|
|
|
};
|
|
|
|
enum OSType {
|
|
|
|
UnknownOS,
|
|
|
|
|
2009-06-19 14:40:01 +00:00
|
|
|
AuroraUX,
|
2009-07-26 04:23:03 +00:00
|
|
|
Cygwin,
|
2009-04-01 21:53:23 +00:00
|
|
|
Darwin,
|
2009-05-22 02:24:11 +00:00
|
|
|
DragonFly,
|
2009-04-01 21:53:23 +00:00
|
|
|
FreeBSD,
|
2011-04-19 20:19:27 +00:00
|
|
|
IOS,
|
2009-06-29 13:36:13 +00:00
|
|
|
Linux,
|
2009-11-19 11:59:00 +00:00
|
|
|
Lv2, // PS3
|
2011-04-19 23:34:12 +00:00
|
|
|
MacOSX,
|
2011-02-17 12:24:17 +00:00
|
|
|
MinGW32, // i*86-pc-mingw32, *-w64-mingw32
|
2009-07-13 20:22:23 +00:00
|
|
|
NetBSD,
|
2009-07-26 04:23:03 +00:00
|
|
|
OpenBSD,
|
2009-11-15 10:18:17 +00:00
|
|
|
Psp,
|
2009-08-18 04:43:27 +00:00
|
|
|
Solaris,
|
2009-10-16 02:06:30 +00:00
|
|
|
Win32,
|
2010-07-07 15:52:27 +00:00
|
|
|
Haiku,
|
2011-02-02 10:08:38 +00:00
|
|
|
Minix
|
2009-04-01 21:53:23 +00:00
|
|
|
};
|
2010-09-16 08:25:48 +00:00
|
|
|
enum EnvironmentType {
|
2011-01-21 18:25:47 +00:00
|
|
|
UnknownEnvironment,
|
|
|
|
|
|
|
|
GNU,
|
|
|
|
GNUEABI,
|
2011-02-01 01:14:13 +00:00
|
|
|
EABI,
|
|
|
|
MachO
|
2010-09-16 08:25:48 +00:00
|
|
|
};
|
2010-11-13 04:17:15 +00:00
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
private:
|
|
|
|
std::string Data;
|
|
|
|
|
|
|
|
/// The parsed arch type (or InvalidArch if uninitialized).
|
|
|
|
mutable ArchType Arch;
|
|
|
|
|
|
|
|
/// The parsed vendor type.
|
|
|
|
mutable VendorType Vendor;
|
|
|
|
|
|
|
|
/// The parsed OS type.
|
|
|
|
mutable OSType OS;
|
|
|
|
|
2010-09-16 08:25:48 +00:00
|
|
|
/// The parsed Environment type.
|
|
|
|
mutable EnvironmentType Environment;
|
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
bool isInitialized() const { return Arch != InvalidArch; }
|
2010-08-12 11:31:39 +00:00
|
|
|
static ArchType ParseArch(StringRef ArchName);
|
|
|
|
static VendorType ParseVendor(StringRef VendorName);
|
|
|
|
static OSType ParseOS(StringRef OSName);
|
2010-09-16 08:25:48 +00:00
|
|
|
static EnvironmentType ParseEnvironment(StringRef EnvironmentName);
|
2009-04-01 21:53:23 +00:00
|
|
|
void Parse() const;
|
|
|
|
|
|
|
|
public:
|
|
|
|
/// @name Constructors
|
|
|
|
/// @{
|
2010-11-13 04:17:15 +00:00
|
|
|
|
2009-08-07 01:43:45 +00:00
|
|
|
Triple() : Data(), Arch(InvalidArch) {}
|
2009-09-08 23:32:51 +00:00
|
|
|
explicit Triple(StringRef Str) : Data(Str), Arch(InvalidArch) {}
|
|
|
|
explicit Triple(StringRef ArchStr, StringRef VendorStr, StringRef OSStr)
|
2009-05-22 02:24:11 +00:00
|
|
|
: Data(ArchStr), Arch(InvalidArch) {
|
|
|
|
Data += '-';
|
|
|
|
Data += VendorStr;
|
|
|
|
Data += '-';
|
|
|
|
Data += OSStr;
|
|
|
|
}
|
2009-04-01 21:53:23 +00:00
|
|
|
|
2010-09-16 08:25:48 +00:00
|
|
|
explicit Triple(StringRef ArchStr, StringRef VendorStr, StringRef OSStr,
|
|
|
|
StringRef EnvironmentStr)
|
|
|
|
: Data(ArchStr), Arch(InvalidArch) {
|
|
|
|
Data += '-';
|
|
|
|
Data += VendorStr;
|
|
|
|
Data += '-';
|
|
|
|
Data += OSStr;
|
|
|
|
Data += '-';
|
|
|
|
Data += EnvironmentStr;
|
|
|
|
}
|
|
|
|
|
2010-08-12 11:31:39 +00:00
|
|
|
/// @}
|
|
|
|
/// @name Normalization
|
|
|
|
/// @{
|
|
|
|
|
|
|
|
/// normalize - Turn an arbitrary machine specification into the canonical
|
|
|
|
/// triple form (or something sensible that the Triple class understands if
|
|
|
|
/// nothing better can reasonably be done). In particular, it handles the
|
|
|
|
/// common case in which otherwise valid components are in the wrong order.
|
|
|
|
static std::string normalize(StringRef Str);
|
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
/// @}
|
|
|
|
/// @name Typed Component Access
|
|
|
|
/// @{
|
2010-11-13 04:17:15 +00:00
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
/// getArch - Get the parsed architecture type of this triple.
|
2010-11-13 04:17:15 +00:00
|
|
|
ArchType getArch() const {
|
|
|
|
if (!isInitialized()) Parse();
|
2009-04-01 21:53:23 +00:00
|
|
|
return Arch;
|
|
|
|
}
|
2010-11-13 04:17:15 +00:00
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
/// getVendor - Get the parsed vendor type of this triple.
|
2010-11-13 04:17:15 +00:00
|
|
|
VendorType getVendor() const {
|
|
|
|
if (!isInitialized()) Parse();
|
2009-04-01 21:53:23 +00:00
|
|
|
return Vendor;
|
|
|
|
}
|
2010-11-13 04:17:15 +00:00
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
/// getOS - Get the parsed operating system type of this triple.
|
2010-11-13 04:17:15 +00:00
|
|
|
OSType getOS() const {
|
|
|
|
if (!isInitialized()) Parse();
|
2009-04-01 21:53:23 +00:00
|
|
|
return OS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// hasEnvironment - Does this triple have the optional environment
|
|
|
|
/// (fourth) component?
|
|
|
|
bool hasEnvironment() const {
|
|
|
|
return getEnvironmentName() != "";
|
|
|
|
}
|
|
|
|
|
2010-09-16 08:25:48 +00:00
|
|
|
/// getEnvironment - Get the parsed environment type of this triple.
|
2010-11-13 04:17:15 +00:00
|
|
|
EnvironmentType getEnvironment() const {
|
|
|
|
if (!isInitialized()) Parse();
|
2010-09-16 08:25:48 +00:00
|
|
|
return Environment;
|
|
|
|
}
|
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
/// @}
|
|
|
|
/// @name Direct Component Access
|
|
|
|
/// @{
|
|
|
|
|
2009-11-11 00:43:14 +00:00
|
|
|
const std::string &str() const { return Data; }
|
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
const std::string &getTriple() const { return Data; }
|
|
|
|
|
|
|
|
/// getArchName - Get the architecture (first) component of the
|
|
|
|
/// triple.
|
2009-07-26 03:31:47 +00:00
|
|
|
StringRef getArchName() const;
|
2009-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
/// getVendorName - Get the vendor (second) component of the triple.
|
2009-07-26 03:31:47 +00:00
|
|
|
StringRef getVendorName() const;
|
2009-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
/// getOSName - Get the operating system (third) component of the
|
|
|
|
/// triple.
|
2009-07-26 03:31:47 +00:00
|
|
|
StringRef getOSName() const;
|
2009-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
/// getEnvironmentName - Get the optional environment (fourth)
|
|
|
|
/// component of the triple, or "" if empty.
|
2009-07-26 03:31:47 +00:00
|
|
|
StringRef getEnvironmentName() const;
|
2009-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
/// getOSAndEnvironmentName - Get the operating system and optional
|
|
|
|
/// environment components as a single string (separated by a '-'
|
|
|
|
/// if the environment component is present).
|
2009-07-26 03:31:47 +00:00
|
|
|
StringRef getOSAndEnvironmentName() const;
|
2009-04-01 21:53:23 +00:00
|
|
|
|
2011-04-19 20:24:34 +00:00
|
|
|
/// getOSNumber - Parse the version number from the OS name component of the
|
|
|
|
/// triple, if present.
|
|
|
|
///
|
|
|
|
/// For example, "fooos1.2.3" would return (1, 2, 3).
|
|
|
|
///
|
|
|
|
/// If an entry is not defined, it will be returned as 0.
|
|
|
|
void getOSVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const;
|
|
|
|
|
|
|
|
/// getOSMajorVersion - Return just the major version number, this is
|
|
|
|
/// specialized because it is a common query.
|
|
|
|
unsigned getOSMajorVersion() const {
|
|
|
|
unsigned Maj, Min, Micro;
|
|
|
|
getDarwinNumber(Maj, Min, Micro);
|
|
|
|
return Maj;
|
|
|
|
}
|
2010-11-13 04:17:15 +00:00
|
|
|
|
2011-04-19 20:24:34 +00:00
|
|
|
void getDarwinNumber(unsigned &Major, unsigned &Minor,
|
|
|
|
unsigned &Micro) const {
|
|
|
|
return getOSVersion(Major, Minor, Micro);
|
|
|
|
}
|
2010-11-13 04:17:15 +00:00
|
|
|
|
2009-08-12 06:19:40 +00:00
|
|
|
unsigned getDarwinMajorNumber() const {
|
2011-04-19 20:24:34 +00:00
|
|
|
return getOSMajorVersion();
|
2009-08-12 06:19:40 +00:00
|
|
|
}
|
2010-11-13 04:17:15 +00:00
|
|
|
|
2011-04-19 21:12:05 +00:00
|
|
|
/// isOSVersionLT - Helper function for doing comparisons against version
|
|
|
|
/// numbers included in the target triple.
|
2011-04-19 20:30:10 +00:00
|
|
|
bool isOSVersionLT(unsigned Major, unsigned Minor = 0,
|
|
|
|
unsigned Micro = 0) const {
|
2011-04-19 20:30:07 +00:00
|
|
|
unsigned LHS[3];
|
|
|
|
getOSVersion(LHS[0], LHS[1], LHS[2]);
|
|
|
|
|
|
|
|
if (LHS[0] != Major)
|
|
|
|
return LHS[0] < Major;
|
|
|
|
if (LHS[1] != Minor)
|
|
|
|
return LHS[1] < Minor;
|
|
|
|
if (LHS[2] != Micro)
|
|
|
|
return LHS[1] < Micro;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2011-04-20 00:14:25 +00:00
|
|
|
/// isMacOSX - Is this a Mac OS X triple. For legacy reasons, we support both
|
2011-04-19 20:30:10 +00:00
|
|
|
/// "darwin" and "osx" as OS X triples.
|
2011-04-20 00:14:25 +00:00
|
|
|
bool isMacOSX() const {
|
2011-04-19 23:55:20 +00:00
|
|
|
return getOS() == Triple::Darwin || getOS() == Triple::MacOSX;
|
2011-04-19 20:30:10 +00:00
|
|
|
}
|
|
|
|
|
2011-04-19 21:12:05 +00:00
|
|
|
/// isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
|
|
|
|
bool isOSDarwin() const {
|
2011-04-20 00:14:25 +00:00
|
|
|
return isMacOSX() ||getOS() == Triple::IOS;
|
2011-04-19 21:12:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// isOSWindows - Is this a "Windows" OS.
|
|
|
|
bool isOSWindows() const {
|
|
|
|
return getOS() == Triple::Win32 || getOS() == Triple::Cygwin ||
|
|
|
|
getOS() == Triple::MinGW32;
|
|
|
|
}
|
|
|
|
|
2011-04-20 00:14:25 +00:00
|
|
|
/// isMacOSXVersionLT - Comparison function for checking OS X version
|
2011-04-19 20:30:10 +00:00
|
|
|
/// compatibility, which handles supporting skewed version numbering schemes
|
|
|
|
/// used by the "darwin" triples.
|
2011-04-20 00:14:25 +00:00
|
|
|
unsigned isMacOSXVersionLT(unsigned Major, unsigned Minor = 0,
|
2011-04-19 20:30:10 +00:00
|
|
|
unsigned Micro = 0) const {
|
2011-04-20 00:14:25 +00:00
|
|
|
assert(isMacOSX() && "Not an OS X triple!");
|
2011-04-19 20:30:10 +00:00
|
|
|
|
|
|
|
// If this is OS X, expect a sane version number.
|
2011-04-19 23:55:20 +00:00
|
|
|
if (getOS() == Triple::MacOSX)
|
2011-04-19 20:30:10 +00:00
|
|
|
return isOSVersionLT(Major, Minor, Micro);
|
|
|
|
|
|
|
|
// Otherwise, compare to the "Darwin" number.
|
|
|
|
assert(Major == 10 && "Unexpected major version");
|
|
|
|
return isOSVersionLT(Minor + 4, Micro, 0);
|
|
|
|
}
|
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
/// @}
|
|
|
|
/// @name Mutators
|
|
|
|
/// @{
|
|
|
|
|
|
|
|
/// setArch - Set the architecture (first) component of the triple
|
|
|
|
/// to a known type.
|
|
|
|
void setArch(ArchType Kind);
|
|
|
|
|
|
|
|
/// setVendor - Set the vendor (second) component of the triple to a
|
|
|
|
/// known type.
|
|
|
|
void setVendor(VendorType Kind);
|
|
|
|
|
|
|
|
/// setOS - Set the operating system (third) component of the triple
|
|
|
|
/// to a known type.
|
|
|
|
void setOS(OSType Kind);
|
|
|
|
|
2010-09-16 08:25:48 +00:00
|
|
|
/// setEnvironment - Set the environment (fourth) component of the triple
|
|
|
|
/// to a known type.
|
|
|
|
void setEnvironment(EnvironmentType Kind);
|
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
/// setTriple - Set all components to the new triple \arg Str.
|
2009-07-26 03:31:47 +00:00
|
|
|
void setTriple(const Twine &Str);
|
2009-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
/// setArchName - Set the architecture (first) component of the
|
|
|
|
/// triple by name.
|
2009-11-06 10:58:06 +00:00
|
|
|
void setArchName(StringRef Str);
|
2009-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
/// setVendorName - Set the vendor (second) component of the triple
|
|
|
|
/// by name.
|
2009-11-06 10:58:06 +00:00
|
|
|
void setVendorName(StringRef Str);
|
2009-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
/// setOSName - Set the operating system (third) component of the
|
|
|
|
/// triple by name.
|
2009-11-06 10:58:06 +00:00
|
|
|
void setOSName(StringRef Str);
|
2009-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
/// setEnvironmentName - Set the optional environment (fourth)
|
|
|
|
/// component of the triple by name.
|
2009-11-06 10:58:06 +00:00
|
|
|
void setEnvironmentName(StringRef Str);
|
2009-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
/// setOSAndEnvironmentName - Set the operating system and optional
|
|
|
|
/// environment components with a single string.
|
2009-11-06 10:58:06 +00:00
|
|
|
void setOSAndEnvironmentName(StringRef Str);
|
2009-04-01 21:53:23 +00:00
|
|
|
|
2010-07-13 05:50:08 +00:00
|
|
|
/// getArchNameForAssembler - Get an architecture name that is understood by
|
|
|
|
/// the target assembler.
|
2009-11-17 18:48:27 +00:00
|
|
|
const char *getArchNameForAssembler();
|
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
/// @}
|
|
|
|
/// @name Static helpers for IDs.
|
|
|
|
/// @{
|
|
|
|
|
|
|
|
/// getArchTypeName - Get the canonical name for the \arg Kind
|
|
|
|
/// architecture.
|
|
|
|
static const char *getArchTypeName(ArchType Kind);
|
|
|
|
|
2009-08-24 09:53:06 +00:00
|
|
|
/// getArchTypePrefix - Get the "prefix" canonical name for the \arg Kind
|
|
|
|
/// architecture. This is the prefix used by the architecture specific
|
|
|
|
/// builtins, and is suitable for passing to \see
|
|
|
|
/// Intrinsic::getIntrinsicForGCCBuiltin().
|
|
|
|
///
|
|
|
|
/// \return - The architecture prefix, or 0 if none is defined.
|
|
|
|
static const char *getArchTypePrefix(ArchType Kind);
|
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
/// getVendorTypeName - Get the canonical name for the \arg Kind
|
|
|
|
/// vendor.
|
|
|
|
static const char *getVendorTypeName(VendorType Kind);
|
|
|
|
|
2010-09-16 08:25:48 +00:00
|
|
|
/// getOSTypeName - Get the canonical name for the \arg Kind operating
|
|
|
|
/// system.
|
2009-04-01 21:53:23 +00:00
|
|
|
static const char *getOSTypeName(OSType Kind);
|
|
|
|
|
2010-09-16 08:25:48 +00:00
|
|
|
/// getEnvironmentTypeName - Get the canonical name for the \arg Kind
|
|
|
|
/// environment.
|
|
|
|
static const char *getEnvironmentTypeName(EnvironmentType Kind);
|
|
|
|
|
2009-09-08 23:32:51 +00:00
|
|
|
/// @}
|
|
|
|
/// @name Static helpers for converting alternate architecture names.
|
|
|
|
/// @{
|
|
|
|
|
2009-08-03 04:03:51 +00:00
|
|
|
/// getArchTypeForLLVMName - The canonical type for the given LLVM
|
|
|
|
/// architecture name (e.g., "x86").
|
2009-11-06 10:58:06 +00:00
|
|
|
static ArchType getArchTypeForLLVMName(StringRef Str);
|
2009-08-03 04:03:51 +00:00
|
|
|
|
2009-09-08 23:32:51 +00:00
|
|
|
/// getArchTypeForDarwinArchName - Get the architecture type for a "Darwin"
|
|
|
|
/// architecture name, for example as accepted by "gcc -arch" (see also
|
|
|
|
/// arch(3)).
|
2009-11-06 10:58:06 +00:00
|
|
|
static ArchType getArchTypeForDarwinArchName(StringRef Str);
|
2009-09-08 23:32:51 +00:00
|
|
|
|
2009-04-01 21:53:23 +00:00
|
|
|
/// @}
|
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|