]> granicus.if.org Git - clang/commit
[ObjC] Disallow vector parameters and return values in Objective-C methods
authorAlex Lorenz <arphaman@gmail.com>
Thu, 27 Apr 2017 10:43:48 +0000 (10:43 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Thu, 27 Apr 2017 10:43:48 +0000 (10:43 +0000)
commit0b6b713771f097ba9cc1d62af5dd5521cbf7670c
tree34198617489b8b040960a756c3ebb7d1000cc525
parent46755a96f6909bd941235bebc090498ccdfd66ff
[ObjC] Disallow vector parameters and return values in Objective-C methods
for iOS < 9 and OS X < 10.11 X86 targets

This commit adds a new error that disallows methods that have parameters/return
values with a vector type for some older X86 targets. This diagnostic is
needed because objc_msgSend doesn't support SIMD vector registers/return values
on X86 in iOS < 9 and OS X < 10.11. Note that we don't necessarily know if the
vector argument/return value will use a SIMD register, so instead we chose to
be conservative and prohibit all vector types.

rdar://21662309

Differential Revision: https://reviews.llvm.org/D28670

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301532 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/DeclBase.h
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/DeclBase.cpp
lib/Sema/SemaDeclObjC.cpp
test/SemaObjC/x86-method-vector-values.m [new file with mode: 0644]