[Sema] Make extended vectors of `bool` an error.
In OpenCL, `bool` vectors are a reserved type, and are therefore illegal. Outside of OpenCL, if we try to make an extended vector of N `bool`s, Clang will lower it to an `[N x i1]`. LLVM has no ABI for bitvectors, so lots of operations on such vectors are thoroughly broken. As a result, this patch makes them illegal in everything else, as well. :) Differential Revision: http://reviews.llvm.org/D15721 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259011 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- lib/Sema/SemaType.cpp 10 additions, 4 deletionslib/Sema/SemaType.cpp
- test/CodeGen/convertvector.c 0 additions, 22 deletionstest/CodeGen/convertvector.c
- test/Sema/ext_vector_casts.c 2 additions, 0 deletionstest/Sema/ext_vector_casts.c
- test/SemaOpenCL/bool-vectors.cl 3 additions, 0 deletionstest/SemaOpenCL/bool-vectors.cl
Loading
Please register or sign in to comment