2009-04-01 23:53:23 +02: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 05:31:47 +02:00
|
|
|
#include "llvm/ADT/StringRef.h"
|
2009-04-01 23:53:23 +02:00
|
|
|
#include <string>
|
|
|
|
|
2009-08-26 07:00:16 +02:00
|
|
|
// Some system headers or GCC predefined macros conflict with identifiers in
|
|
|
|
// this file. Undefine them here.
|
|
|
|
#undef mips
|
|
|
|
#undef sparc
|
|
|
|
|
2009-04-01 23:53:23 +02:00
|
|
|
namespace llvm {
|
2009-07-26 05:31:47 +02:00
|
|
|
class StringRef;
|
|
|
|
class Twine;
|
2009-04-01 23:53:23 +02:00
|
|
|
|
|
|
|
/// Triple - Helper class for working with target triples.
|
|
|
|
///
|
2010-08-12 13:31:39 +02:00
|
|
|
/// Target triples are strings in the canonical form:
|
2009-04-01 23:53:23 +02: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 21:26:55 +02:00
|
|
|
/// At its core the Triple class is designed to be a wrapper for a triple
|
2010-08-12 13:31:39 +02: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 21:26:55 +02:00
|
|
|
///
|
2010-08-12 13:31:39 +02:00
|
|
|
/// See autoconf/config.guess for a glimpse into what triples look like in
|
2009-08-18 21:26:55 +02:00
|
|
|
/// practice.
|
2009-04-01 23:53:23 +02:00
|
|
|
class Triple {
|
|
|
|
public:
|
|
|
|
enum ArchType {
|
|
|
|
UnknownArch,
|
2010-11-13 05:17:15 +01:00
|
|
|
|
2009-08-02 21:41:20 +02:00
|
|
|
alpha, // Alpha: alpha
|
2009-08-18 06:51:26 +02:00
|
|
|
arm, // ARM; arm, armv.*, xscale
|
2009-08-02 21:41:20 +02:00
|
|
|
bfin, // Blackfin: bfin
|
|
|
|
cellspu, // CellSPU: spu, cellspu
|
|
|
|
mips, // MIPS: mips, mipsallegrex
|
|
|
|
mipsel, // MIPSEL: mipsel, mipsallegrexel, psp
|
2009-08-18 15:50:28 +02:00
|
|
|
msp430, // MSP430: msp430
|
2009-08-02 21:41:20 +02:00
|
|
|
ppc, // PPC: powerpc
|
2009-11-19 12:59:00 +01:00
|
|
|
ppc64, // PPC64: powerpc64, ppu
|
2009-08-02 21:41:20 +02:00
|
|
|
sparc, // Sparc: sparc
|
2010-02-04 07:34:01 +01:00
|
|
|
sparcv9, // Sparcv9: Sparcv9
|
2009-08-02 21:41:20 +02:00
|
|
|
systemz, // SystemZ: s390x
|
2009-08-19 22:46:03 +02:00
|
|
|
tce, // TCE (http://tce.cs.tut.fi/): tce
|
2009-08-02 21:41:20 +02:00
|
|
|
thumb, // Thumb: thumb, thumbv.*
|
|
|
|
x86, // X86: i[3-9]86
|
|
|
|
x86_64, // X86-64: amd64, x86_64
|
|
|
|
xcore, // XCore: xcore
|
2010-02-23 20:15:24 +01:00
|
|
|
mblaze, // MBlaze: mblaze
|
2011-04-20 17:37:17 +02:00
|
|
|
ptx32, // PTX: ptx (32-bit)
|
|
|
|
ptx64, // PTX: ptx (64-bit)
|
2009-04-01 23:53:23 +02:00
|
|
|
|
|
|
|
InvalidArch
|
|
|
|
};
|
|
|
|
enum VendorType {
|
|
|
|
UnknownVendor,
|
|
|
|
|
2010-11-13 05:17:15 +01:00
|
|
|
Apple,
|
2011-03-15 22:51:56 +01:00
|
|
|
PC,
|
|
|
|
SCEI
|
2009-04-01 23:53:23 +02:00
|
|
|
};
|
|
|
|
enum OSType {
|
|
|
|
UnknownOS,
|
|
|
|
|
2009-06-19 16:40:01 +02:00
|
|
|
AuroraUX,
|
2009-07-26 06:23:03 +02:00
|
|
|
Cygwin,
|
2009-04-01 23:53:23 +02:00
|
|
|
Darwin,
|
2009-05-22 04:24:11 +02:00
|
|
|
DragonFly,
|
2009-04-01 23:53:23 +02:00
|
|
|
FreeBSD,
|
2011-04-19 22:19:27 +02:00
|
|
|
IOS,
|
2009-06-29 15:36:13 +02:00
|
|
|
Linux,
|
2009-11-19 12:59:00 +01:00
|
|
|
Lv2, // PS3
|
2011-04-20 01:34:12 +02:00
|
|
|
MacOSX,
|
2011-02-17 13:24:17 +01:00
|
|
|
MinGW32, // i*86-pc-mingw32, *-w64-mingw32
|
2009-07-13 22:22:23 +02:00
|
|
|
NetBSD,
|
2009-07-26 06:23:03 +02:00
|
|
|
OpenBSD,
|
2009-11-15 11:18:17 +01:00
|
|
|
Psp,
|
2009-08-18 06:43:27 +02:00
|
|
|
Solaris,
|
2009-10-16 04:06:30 +02:00
|
|
|
Win32,
|
2010-07-07 17:52:27 +02:00
|
|
|
Haiku,
|
2011-02-02 11:08:38 +01:00
|
|
|
Minix
|
2009-04-01 23:53:23 +02:00
|
|
|
};
|
2010-09-16 10:25:48 +02:00
|
|
|
enum EnvironmentType {
|
2011-01-21 19:25:47 +01:00
|
|
|
UnknownEnvironment,
|
|
|
|
|
|
|
|
GNU,
|
|
|
|
GNUEABI,
|
2011-02-01 02:14:13 +01:00
|
|
|
EABI,
|
|
|
|
MachO
|
2010-09-16 10:25:48 +02:00
|
|
|
};
|
2010-11-13 05:17:15 +01:00
|
|
|
|
2009-04-01 23:53:23 +02: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 10:25:48 +02:00
|
|
|
/// The parsed Environment type.
|
|
|
|
mutable EnvironmentType Environment;
|
|
|
|
|
2009-04-01 23:53:23 +02:00
|
|
|
bool isInitialized() const { return Arch != InvalidArch; }
|
2010-08-12 13:31:39 +02:00
|
|
|
static ArchType ParseArch(StringRef ArchName);
|
|
|
|
static VendorType ParseVendor(StringRef VendorName);
|
|
|
|
static OSType ParseOS(StringRef OSName);
|
2010-09-16 10:25:48 +02:00
|
|
|
static EnvironmentType ParseEnvironment(StringRef EnvironmentName);
|
2009-04-01 23:53:23 +02:00
|
|
|
void Parse() const;
|
|
|
|
|
|
|
|
public:
|
|
|
|
/// @name Constructors
|
|
|
|
/// @{
|
2010-11-13 05:17:15 +01:00
|
|
|
|
2009-08-07 03:43:45 +02:00
|
|
|
Triple() : Data(), Arch(InvalidArch) {}
|
2009-09-09 01:32:51 +02:00
|
|
|
explicit Triple(StringRef Str) : Data(Str), Arch(InvalidArch) {}
|
|
|
|
explicit Triple(StringRef ArchStr, StringRef VendorStr, StringRef OSStr)
|
2009-05-22 04:24:11 +02:00
|
|
|
: Data(ArchStr), Arch(InvalidArch) {
|
|
|
|
Data += '-';
|
|
|
|
Data += VendorStr;
|
|
|
|
Data += '-';
|
|
|
|
Data += OSStr;
|
|
|
|
}
|
2009-04-01 23:53:23 +02:00
|
|
|
|
2010-09-16 10:25:48 +02: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 13:31:39 +02: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 23:53:23 +02:00
|
|
|
/// @}
|
|
|
|
/// @name Typed Component Access
|
|
|
|
/// @{
|
2010-11-13 05:17:15 +01:00
|
|
|
|
2009-04-01 23:53:23 +02:00
|
|
|
/// getArch - Get the parsed architecture type of this triple.
|
2010-11-13 05:17:15 +01:00
|
|
|
ArchType getArch() const {
|
|
|
|
if (!isInitialized()) Parse();
|
2009-04-01 23:53:23 +02:00
|
|
|
return Arch;
|
|
|
|
}
|
2010-11-13 05:17:15 +01:00
|
|
|
|
2009-04-01 23:53:23 +02:00
|
|
|
/// getVendor - Get the parsed vendor type of this triple.
|
2010-11-13 05:17:15 +01:00
|
|
|
VendorType getVendor() const {
|
|
|
|
if (!isInitialized()) Parse();
|
2009-04-01 23:53:23 +02:00
|
|
|
return Vendor;
|
|
|
|
}
|
2010-11-13 05:17:15 +01:00
|
|
|
|
2009-04-01 23:53:23 +02:00
|
|
|
/// getOS - Get the parsed operating system type of this triple.
|
2010-11-13 05:17:15 +01:00
|
|
|
OSType getOS() const {
|
|
|
|
if (!isInitialized()) Parse();
|
2009-04-01 23:53:23 +02:00
|
|
|
return OS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// hasEnvironment - Does this triple have the optional environment
|
|
|
|
/// (fourth) component?
|
|
|
|
bool hasEnvironment() const {
|
|
|
|
return getEnvironmentName() != "";
|
|
|
|
}
|
|
|
|
|
2010-09-16 10:25:48 +02:00
|
|
|
/// getEnvironment - Get the parsed environment type of this triple.
|
2010-11-13 05:17:15 +01:00
|
|
|
EnvironmentType getEnvironment() const {
|
|
|
|
if (!isInitialized()) Parse();
|
2010-09-16 10:25:48 +02:00
|
|
|
return Environment;
|
|
|
|
}
|
|
|
|
|
2009-04-01 23:53:23 +02:00
|
|
|
/// @}
|
|
|
|
/// @name Direct Component Access
|
|
|
|
/// @{
|
|
|
|
|
2009-11-11 01:43:14 +01:00
|
|
|
const std::string &str() const { return Data; }
|
|
|
|
|
2009-04-01 23:53:23 +02:00
|
|
|
const std::string &getTriple() const { return Data; }
|
|
|
|
|
|
|
|
/// getArchName - Get the architecture (first) component of the
|
|
|
|
/// triple.
|
2009-07-26 05:31:47 +02:00
|
|
|
StringRef getArchName() const;
|
2009-04-01 23:53:23 +02:00
|
|
|
|
|
|
|
/// getVendorName - Get the vendor (second) component of the triple.
|
2009-07-26 05:31:47 +02:00
|
|
|
StringRef getVendorName() const;
|
2009-04-01 23:53:23 +02:00
|
|
|
|
|
|
|
/// getOSName - Get the operating system (third) component of the
|
|
|
|
/// triple.
|
2009-07-26 05:31:47 +02:00
|
|
|
StringRef getOSName() const;
|
2009-04-01 23:53:23 +02:00
|
|
|
|
|
|
|
/// getEnvironmentName - Get the optional environment (fourth)
|
|
|
|
/// component of the triple, or "" if empty.
|
2009-07-26 05:31:47 +02:00
|
|
|
StringRef getEnvironmentName() const;
|
2009-04-01 23:53:23 +02: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 05:31:47 +02:00
|
|
|
StringRef getOSAndEnvironmentName() const;
|
2009-04-01 23:53:23 +02:00
|
|
|
|
2011-04-19 22:24:34 +02: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 05:17:15 +01:00
|
|
|
|
2011-04-19 22:24:34 +02:00
|
|
|
void getDarwinNumber(unsigned &Major, unsigned &Minor,
|
|
|
|
unsigned &Micro) const {
|
|
|
|
return getOSVersion(Major, Minor, Micro);
|
|
|
|
}
|
2010-11-13 05:17:15 +01:00
|
|
|
|
2009-08-12 08:19:40 +02:00
|
|
|
unsigned getDarwinMajorNumber() const {
|
2011-04-19 22:24:34 +02:00
|
|
|
return getOSMajorVersion();
|
2009-08-12 08:19:40 +02:00
|
|
|
}
|
2010-11-13 05:17:15 +01:00
|
|
|
|
2011-04-19 23:12:05 +02:00
|
|
|
/// isOSVersionLT - Helper function for doing comparisons against version
|
|
|
|
/// numbers included in the target triple.
|
2011-04-19 22:30:10 +02:00
|
|
|
bool isOSVersionLT(unsigned Major, unsigned Minor = 0,
|
|
|
|
unsigned Micro = 0) const {
|
2011-04-19 22:30:07 +02: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 02:14:25 +02:00
|
|
|
/// isMacOSX - Is this a Mac OS X triple. For legacy reasons, we support both
|
2011-04-19 22:30:10 +02:00
|
|
|
/// "darwin" and "osx" as OS X triples.
|
2011-04-20 02:14:25 +02:00
|
|
|
bool isMacOSX() const {
|
2011-04-20 01:55:20 +02:00
|
|
|
return getOS() == Triple::Darwin || getOS() == Triple::MacOSX;
|
2011-04-19 22:30:10 +02:00
|
|
|
}
|
|
|
|
|
2011-04-19 23:12:05 +02:00
|
|
|
/// isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
|
|
|
|
bool isOSDarwin() const {
|
2011-04-20 02:14:25 +02:00
|
|
|
return isMacOSX() ||getOS() == Triple::IOS;
|
2011-04-19 23:12:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/// isOSWindows - Is this a "Windows" OS.
|
|
|
|
bool isOSWindows() const {
|
|
|
|
return getOS() == Triple::Win32 || getOS() == Triple::Cygwin ||
|
|
|
|
getOS() == Triple::MinGW32;
|
|
|
|
}
|
|
|
|
|
2011-04-20 02:14:25 +02:00
|
|
|
/// isMacOSXVersionLT - Comparison function for checking OS X version
|
2011-04-19 22:30:10 +02:00
|
|
|
/// compatibility, which handles supporting skewed version numbering schemes
|
|
|
|
/// used by the "darwin" triples.
|
2011-04-20 02:14:25 +02:00
|
|
|
unsigned isMacOSXVersionLT(unsigned Major, unsigned Minor = 0,
|
2011-04-19 22:30:10 +02:00
|
|
|
unsigned Micro = 0) const {
|
2011-04-20 02:14:25 +02:00
|
|
|
assert(isMacOSX() && "Not an OS X triple!");
|
2011-04-19 22:30:10 +02:00
|
|
|
|
|
|
|
// If this is OS X, expect a sane version number.
|
2011-04-20 01:55:20 +02:00
|
|
|
if (getOS() == Triple::MacOSX)
|
2011-04-19 22:30:10 +02: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 23:53:23 +02: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 10:25:48 +02:00
|
|
|
/// setEnvironment - Set the environment (fourth) component of the triple
|
|
|
|
/// to a known type.
|
|
|
|
void setEnvironment(EnvironmentType Kind);
|
|
|
|
|
2009-04-01 23:53:23 +02:00
|
|
|
/// setTriple - Set all components to the new triple \arg Str.
|
2009-07-26 05:31:47 +02:00
|
|
|
void setTriple(const Twine &Str);
|
2009-04-01 23:53:23 +02:00
|
|
|
|
|
|
|
/// setArchName - Set the architecture (first) component of the
|
|
|
|
/// triple by name.
|
2009-11-06 11:58:06 +01:00
|
|
|
void setArchName(StringRef Str);
|
2009-04-01 23:53:23 +02:00
|
|
|
|
|
|
|
/// setVendorName - Set the vendor (second) component of the triple
|
|
|
|
/// by name.
|
2009-11-06 11:58:06 +01:00
|
|
|
void setVendorName(StringRef Str);
|
2009-04-01 23:53:23 +02:00
|
|
|
|
|
|
|
/// setOSName - Set the operating system (third) component of the
|
|
|
|
/// triple by name.
|
2009-11-06 11:58:06 +01:00
|
|
|
void setOSName(StringRef Str);
|
2009-04-01 23:53:23 +02:00
|
|
|
|
|
|
|
/// setEnvironmentName - Set the optional environment (fourth)
|
|
|
|
/// component of the triple by name.
|
2009-11-06 11:58:06 +01:00
|
|
|
void setEnvironmentName(StringRef Str);
|
2009-04-01 23:53:23 +02:00
|
|
|
|
|
|
|
/// setOSAndEnvironmentName - Set the operating system and optional
|
|
|
|
/// environment components with a single string.
|
2009-11-06 11:58:06 +01:00
|
|
|
void setOSAndEnvironmentName(StringRef Str);
|
2009-04-01 23:53:23 +02:00
|
|
|
|
2010-07-13 07:50:08 +02:00
|
|
|
/// getArchNameForAssembler - Get an architecture name that is understood by
|
|
|
|
/// the target assembler.
|
2009-11-17 19:48:27 +01:00
|
|
|
const char *getArchNameForAssembler();
|
|
|
|
|
2009-04-01 23:53:23 +02: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 11:53:06 +02: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 23:53:23 +02:00
|
|
|
/// getVendorTypeName - Get the canonical name for the \arg Kind
|
|
|
|
/// vendor.
|
|
|
|
static const char *getVendorTypeName(VendorType Kind);
|
|
|
|
|
2010-09-16 10:25:48 +02:00
|
|
|
/// getOSTypeName - Get the canonical name for the \arg Kind operating
|
|
|
|
/// system.
|
2009-04-01 23:53:23 +02:00
|
|
|
static const char *getOSTypeName(OSType Kind);
|
|
|
|
|
2010-09-16 10:25:48 +02:00
|
|
|
/// getEnvironmentTypeName - Get the canonical name for the \arg Kind
|
|
|
|
/// environment.
|
|
|
|
static const char *getEnvironmentTypeName(EnvironmentType Kind);
|
|
|
|
|
2009-09-09 01:32:51 +02:00
|
|
|
/// @}
|
|
|
|
/// @name Static helpers for converting alternate architecture names.
|
|
|
|
/// @{
|
|
|
|
|
2009-08-03 06:03:51 +02:00
|
|
|
/// getArchTypeForLLVMName - The canonical type for the given LLVM
|
|
|
|
/// architecture name (e.g., "x86").
|
2009-11-06 11:58:06 +01:00
|
|
|
static ArchType getArchTypeForLLVMName(StringRef Str);
|
2009-08-03 06:03:51 +02:00
|
|
|
|
2009-09-09 01:32:51 +02: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 11:58:06 +01:00
|
|
|
static ArchType getArchTypeForDarwinArchName(StringRef Str);
|
2009-09-09 01:32:51 +02:00
|
|
|
|
2009-04-01 23:53:23 +02:00
|
|
|
/// @}
|
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|