diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2016-01-13 01:52:39 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2016-01-13 01:52:39 +0000 |
commit | 2824a0744ca037a1b976efcc1d848aecb41dabd5 (patch) | |
tree | 94b5b931d678a3e0c1b7b3d825f2930f48e00e4f /lib/Edit | |
parent | 05d274ca67f6370f61ca426a0939e40f3489f248 (diff) | |
download | clang-2824a0744ca037a1b976efcc1d848aecb41dabd5.tar.gz |
[Bugfix] Fix ICE on constexpr vector splat.
In {CG,}ExprConstant.cpp, we weren't treating vector splats properly.
This patch makes us treat splats more properly.
Additionally, this patch adds a new cast kind which allows a bool->int
cast to result in -1 or 0, instead of 1 or 0 (for true and false,
respectively), so we can sanely model OpenCL bool->int casts in the AST.
Differential Revision: http://reviews.llvm.org/D14877
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Edit')
-rw-r--r-- | lib/Edit/RewriteObjCFoundationAPI.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Edit/RewriteObjCFoundationAPI.cpp b/lib/Edit/RewriteObjCFoundationAPI.cpp index 9f71168de8..482c0f6f85 100644 --- a/lib/Edit/RewriteObjCFoundationAPI.cpp +++ b/lib/Edit/RewriteObjCFoundationAPI.cpp @@ -1077,6 +1077,9 @@ static bool rewriteToNumericBoxedExpression(const ObjCMessageExpr *Msg, case CK_BuiltinFnToFnPtr: case CK_ZeroToOCLEvent: return false; + + case CK_BooleanToSignedIntegral: + llvm_unreachable("OpenCL-specific cast in Objective-C?"); } } |