diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2013-07-11 01:32:21 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2013-07-11 01:32:21 +0000 |
commit | be4504df268af9f68edc212356cbdacf3bbf97da (patch) | |
tree | 771074d052233e1fbf32d2995ea127b35b915e20 /clang/lib/CodeGen/CGExpr.cpp | |
parent | 36ee4fc329540d9df91a19f84293c18641e9fc1c (diff) | |
download | bcm5719-llvm-be4504df268af9f68edc212356cbdacf3bbf97da.tar.gz bcm5719-llvm-be4504df268af9f68edc212356cbdacf3bbf97da.zip |
Simplify atomic load/store IRGen.
Also fixes a couple minor bugs along the way; see testcases.
llvm-svn: 186049
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 419075fe179..b283174514e 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/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()); |