public:
DarwinTargetInfo(const std::string& triple) :
OSTargetInfo<Target>(triple) {
- this->TLSSupported = llvm::Triple(triple).getDarwinMajorNumber() > 10;
+ llvm::Triple T = llvm::Triple(triple);
+ this->TLSSupported = T.isMacOSX() && !T.isMacOSXVersionLT(10,7);
this->MCountName = "\01mcount";
}
if (CGM.getLangOptions().ObjCAutoRefCount ||
(CGM.isTargetDarwin() &&
((Triple.getArch() == llvm::Triple::x86_64 &&
- Triple.getDarwinMajorNumber() >= 11)
+ !Triple.isMacOSXVersionLT(10,7,0))
|| (Triple.getEnvironmentName() == "iphoneos" &&
- Triple.getDarwinMajorNumber() >= 5)))) {
+ !Triple.isOSVersionLT(5,0))))) {
llvm::Value *token = EmitObjCAutoreleasePoolPush();
EHStack.pushCleanup<CallObjCAutoreleasePoolObject>(NormalCleanup, token);
} else {
if (Triple.getOS() != llvm::Triple::Darwin)
return false;
- return (Triple.getDarwinMajorNumber() >= 9 &&
+ return (!Triple.isMacOSXVersionLT(10,5) &&
(Triple.getArch() == llvm::Triple::x86_64 ||
Triple.getArch() == llvm::Triple::arm));
}
static bool supportsNilWithFloatRet(const llvm::Triple &triple) {
return triple.getVendor() == llvm::Triple::Apple &&
- (triple.getDarwinMajorNumber() >= 9 ||
+ (!triple.isMacOSXVersionLT(10,5) ||
triple.getArch() == llvm::Triple::arm ||
triple.getArch() == llvm::Triple::thumb);
}