summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-07-11 01:32:21 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-07-11 01:32:21 +0000
commit336d9df5e628279425344d754dc68047fa5b00a7 (patch)
tree206141f2221283a0e58034ab31e6ba3a01354f31 /lib/CodeGen/CGExpr.cpp
parent151a8a85f8e40a13d19b9d9d01fd9726dd8de9df (diff)
downloadclang-336d9df5e628279425344d754dc68047fa5b00a7.tar.gz
clang-336d9df5e628279425344d754dc68047fa5b00a7.tar.bz2
clang-336d9df5e628279425344d754dc68047fa5b00a7.tar.xz
Simplify atomic load/store IRGen.
Also fixes a couple minor bugs along the way; see testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 419075fe17..b283174514 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -2717,11 +2717,10 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) {
case CK_BuiltinFnToFnPtr:
llvm_unreachable("builtin functions are handled elsewhere");
- // These two casts are currently treated as no-ops, although they could
- // potentially be real operations depending on the target's ABI.
+ // These are never l-values; just use the aggregate emission code.
case CK_NonAtomicToAtomic:
case CK_AtomicToNonAtomic:
- return EmitLValue(E->getSubExpr());
+ return EmitAggExprToLValue(E);
case CK_Dynamic: {
LValue LV = EmitLValue(E->getSubExpr());