summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-06-25 02:26:44 +0000
committerJohn McCall <rjmccall@apple.com>2011-06-25 02:26:44 +0000
commitb793de703e9ecc6d16f7b4e47bfa2f1fd2b94ea0 (patch)
treefdf66e22a3ab558e1dc2d601207d8604c30cb3ff /clang/lib/CodeGen/CGObjC.cpp
parent55e1fbc848c0d2f3660251a9b6ef19beff512ac8 (diff)
downloadbcm5719-llvm-b793de703e9ecc6d16f7b4e47bfa2f1fd2b94ea0.tar.gz
bcm5719-llvm-b793de703e9ecc6d16f7b4e47bfa2f1fd2b94ea0.zip
Do not apply the ARC move optimization to 'const'-qualified xvalues.
llvm-svn: 133861
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index 2782c2b3f75..4c59e6ae291 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -2269,7 +2269,7 @@ tryEmitARCRetainScalarExpr(CodeGenFunction &CGF, const Expr *e) {
// If we're loading retained from a __strong xvalue, we can avoid
// an extra retain/release pair by zeroing out the source of this
// "move" operation.
- if (e->isXValue() &&
+ if (e->isXValue() && !e->getType().isConstQualified() &&
e->getType().getObjCLifetime() == Qualifiers::OCL_Strong) {
// Emit the lvalue
LValue lv = CGF.EmitLValue(e);
OpenPOWER on IntegriCloud