return false;
}
- /// isOSX - Is this an OS X triple. For legacy reasons, we support both
+ /// isMacOSX - Is this a Mac OS X triple. For legacy reasons, we support both
/// "darwin" and "osx" as OS X triples.
- bool isOSX() const {
+ bool isMacOSX() const {
return getOS() == Triple::Darwin || getOS() == Triple::MacOSX;
}
/// isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
bool isOSDarwin() const {
- return isOSX() ||getOS() == Triple::IOS;
+ return isMacOSX() ||getOS() == Triple::IOS;
}
/// isOSWindows - Is this a "Windows" OS.
getOS() == Triple::MinGW32;
}
- /// isOSXVersionLT - Comparison function for checking OS X version
+ /// isMacOSXVersionLT - Comparison function for checking OS X version
/// compatibility, which handles supporting skewed version numbering schemes
/// used by the "darwin" triples.
- unsigned isOSXVersionLT(unsigned Major, unsigned Minor = 0,
+ unsigned isMacOSXVersionLT(unsigned Major, unsigned Minor = 0,
unsigned Micro = 0) const {
- assert(isOSX() && "Not an OS X triple!");
+ assert(isMacOSX() && "Not an OS X triple!");
// If this is OS X, expect a sane version number.
if (getOS() == Triple::MacOSX)
// .comm doesn't support alignment before Leopard.
Triple T(((LLVMTargetMachine&)TM).getTargetTriple());
- if (T.isOSX() && T.isOSXVersionLT(10, 5))
+ if (T.isMacOSX() && T.isMacOSXVersionLT(10, 5))
CommDirectiveSupportsAlignment = false;
TargetLoweringObjectFile::Initialize(Ctx, TM);
if (!DAG.getTarget().getSubtarget<PPCSubtarget>().isJITCodeModel()) {
unsigned OpFlags = 0;
if (DAG.getTarget().getRelocationModel() != Reloc::Static &&
- (!PPCSubTarget.getTargetTriple().isOSX() ||
- PPCSubTarget.getTargetTriple().isOSXVersionLT(10, 5)) &&
+ (!PPCSubTarget.getTargetTriple().isMacOSX() ||
+ PPCSubTarget.getTargetTriple().isMacOSXVersionLT(10, 5)) &&
(G->getGlobal()->isDeclaration() ||
G->getGlobal()->isWeakForLinker())) {
// PC-relative references to external symbols should go through $stub,
unsigned char OpFlags = 0;
if (DAG.getTarget().getRelocationModel() != Reloc::Static &&
- (!PPCSubTarget.getTargetTriple().isOSX() ||
- PPCSubTarget.getTargetTriple().isOSXVersionLT(10, 5))) {
+ (!PPCSubTarget.getTargetTriple().isMacOSX() ||
+ PPCSubTarget.getTargetTriple().isMacOSXVersionLT(10, 5))) {
// PC-relative references to external symbols should go through $stub,
// unless we're building with the leopard linker or later, which
// automatically synthesizes these stubs.
const Triple &getTargetTriple() const { return TargetTriple; }
/// isDarwin - True if this is any darwin platform.
- bool isDarwin() const { return TargetTriple.isOSX(); }
+ bool isDarwin() const { return TargetTriple.isMacOSX(); }
bool isDarwinABI() const { return isDarwin(); }
bool isSVR4ABI() const { return !isDarwin(); }
// memset_pattern16 is only available on iOS 3.0 and Mac OS/X 10.5 and later.
- if (T.isOSX()) {
- if (T.isOSXVersionLT(10, 5))
+ if (T.isMacOSX()) {
+ if (T.isMacOSXVersionLT(10, 5))
TLI.setUnavailable(LibFunc::memset_pattern16);
} else if (T.getOS() == Triple::IOS) {
if (T.isOSVersionLT(3, 0))
OpFlags = X86II::MO_PLT;
} else if (Subtarget->isPICStyleStubAny() &&
(GV->isDeclaration() || GV->isWeakForLinker()) &&
- (!Subtarget->getTargetTriple().isOSX() ||
- Subtarget->getTargetTriple().isOSXVersionLT(10, 5))) {
+ (!Subtarget->getTargetTriple().isMacOSX() ||
+ Subtarget->getTargetTriple().isMacOSXVersionLT(10, 5))) {
// PC-relative references to external symbols should go through $stub,
// unless we're building with the leopard linker or later, which
// automatically synthesizes these stubs.
OpFlags = X86II::MO_PLT;
} else if (Subtarget->isPICStyleStubAny() &&
(GV->isDeclaration() || GV->isWeakForLinker()) &&
- (!Subtarget->getTargetTriple().isOSX() ||
- Subtarget->getTargetTriple().isOSXVersionLT(10, 5))) {
+ (!Subtarget->getTargetTriple().isMacOSX() ||
+ Subtarget->getTargetTriple().isMacOSXVersionLT(10, 5))) {
// PC-relative references to external symbols should go through $stub,
// unless we're building with the leopard linker or later, which
// automatically synthesizes these stubs.
getTargetMachine().getRelocationModel() == Reloc::PIC_) {
OpFlags = X86II::MO_PLT;
} else if (Subtarget->isPICStyleStubAny() &&
- (!Subtarget->getTargetTriple().isOSX() ||
- Subtarget->getTargetTriple().isOSXVersionLT(10, 5))) {
+ (!Subtarget->getTargetTriple().isMacOSX() ||
+ Subtarget->getTargetTriple().isMacOSXVersionLT(10, 5))) {
// PC-relative references to external symbols should go through $stub,
// unless we're building with the leopard linker or later, which
// automatically synthesizes these stubs.
/// passed as the second argument. Otherwise it returns null.
const char *X86Subtarget::getBZeroEntry() const {
// Darwin 10 has a __bzero entry point for this purpose.
- if (getTargetTriple().isOSX() && !getTargetTriple().isOSXVersionLT(10, 6))
+ if (getTargetTriple().isMacOSX() &&
+ !getTargetTriple().isMacOSXVersionLT(10, 6))
return "__bzero";
return 0;
Target.setMCUseLoc(false);
// Disable .loc support for older OS X versions.
- if (TheTriple.isOSX() && TheTriple.isOSXVersionLT(10, 5))
+ if (TheTriple.isMacOSX() &&
+ TheTriple.isMacOSXVersionLT(10, 5))
Target.setMCUseLoc(false);
// Figure out where we are going to send the output...