Update for llvm commit r134291.

Fixes rdar://9714064

llvm-svn: 134292
This commit is contained in:
Eric Christopher
2011-07-02 00:20:22 +00:00
parent 1620130729
commit bf15d2b311
4 changed files with 6 additions and 5 deletions

View File

@@ -189,7 +189,8 @@ protected:
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";
}

View File

@@ -2461,9 +2461,9 @@ void CodeGenFunction::EmitObjCAutoreleasePoolStmt(
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 {

View File

@@ -870,7 +870,7 @@ shouldUseExceptionTablesForObjCExceptions(unsigned objcABIVersion,
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));
}

View File

@@ -282,7 +282,7 @@ void CallAndMessageChecker::emitNilReceiverBug(CheckerContext &C,
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);
}