]> granicus.if.org Git - clang/commitdiff
Fix an assertion failure in isMacOSXVersionLT for IOS targets.
authorBob Wilson <bob.wilson@apple.com>
Tue, 31 Jan 2012 23:52:54 +0000 (23:52 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 31 Jan 2012 23:52:54 +0000 (23:52 +0000)
Check if the triple OS is IOS instead of checking for arm/thumb architectures
and check that before calling isMacOSXVersionLT.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149454 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp

index 6c800a205267ae7b80a52013ad9393420f1083f9..68c578ed878e1853d4641961ed9236a252c9b711 100644 (file)
@@ -286,10 +286,9 @@ void CallAndMessageChecker::emitNilReceiverBug(CheckerContext &C,
 }
 
 static bool supportsNilWithFloatRet(const llvm::Triple &triple) {
-  return triple.getVendor() == llvm::Triple::Apple &&
-         (!triple.isMacOSXVersionLT(10,5) ||
-          triple.getArch() == llvm::Triple::arm || 
-          triple.getArch() == llvm::Triple::thumb);
+  return (triple.getVendor() == llvm::Triple::Apple &&
+          (triple.getOS() == llvm::Triple::IOS ||
+           !triple.isMacOSXVersionLT(10,5)));
 }
 
 void CallAndMessageChecker::HandleNilReceiver(CheckerContext &C,