diff options
author | John McCall <rjmccall@apple.com> | 2011-06-25 02:26:44 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-06-25 02:26:44 +0000 |
commit | df7b091c58ccdb402a32bfbde9c506074dba5f3d (patch) | |
tree | ae884fb6cd59ab28589036a9400c4f7242d67fd3 /lib/CodeGen/CGObjC.cpp | |
parent | 545d996ec5a3113f046944f11b27cc2d6cb055b4 (diff) |
Do not apply the ARC move optimization to 'const'-qualified xvalues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index 2782c2b3f7..4c59e6ae29 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/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); |