[cfe-commits] r134292 - in /cfe/trunk/lib: Basic/Targets.cpp CodeGen/CGObjC.cpp Driver/Tools.cpp StaticAnalyzer/Checkers/CallAndMessageChecker.cpp

Eric Christopher echristo at apple.com
Fri Jul 1 17:20:23 PDT 2011


Author: echristo
Date: Fri Jul  1 19:20:22 2011
New Revision: 134292

URL: http://llvm.org/viewvc/llvm-project?rev=134292&view=rev
Log:
Update for llvm commit r134291.

Fixes rdar://9714064

Modified:
    cfe/trunk/lib/Basic/Targets.cpp
    cfe/trunk/lib/CodeGen/CGObjC.cpp
    cfe/trunk/lib/Driver/Tools.cpp
    cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=134292&r1=134291&r2=134292&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri Jul  1 19:20:22 2011
@@ -189,7 +189,8 @@
 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";
     }
 

Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=134292&r1=134291&r2=134292&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Fri Jul  1 19:20:22 2011
@@ -2461,9 +2461,9 @@
   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 {

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=134292&r1=134291&r2=134292&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Jul  1 19:20:22 2011
@@ -870,7 +870,7 @@
   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));  
 }

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp?rev=134292&r1=134291&r2=134292&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp Fri Jul  1 19:20:22 2011
@@ -282,7 +282,7 @@
 
 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);
 }





More information about the cfe-commits mailing list