diff options
author | Chris Lattner <sabre@nondot.org> | 2010-08-18 00:08:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-08-18 00:08:27 +0000 |
commit | b1995dffaf60784fd0546bf15ad0d464c480d4e7 (patch) | |
tree | 5cb269a145ef0aa1aee713f6de0781a461e56e19 /clang/lib/CodeGen | |
parent | 00d5141aefb2abd2fb3d308f3f4ca74b3b134a71 (diff) | |
download | bcm5719-llvm-b1995dffaf60784fd0546bf15ad0d464c480d4e7.tar.gz bcm5719-llvm-b1995dffaf60784fd0546bf15ad0d464c480d4e7.zip |
Fix PR7889 by generalizing some over specialized code. There is no
reason that this should be limited to simple lvalues.
llvm-svn: 111331
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index e9788709963..18ecf1719f2 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1938,10 +1938,8 @@ LValue CodeGenFunction::EmitBinaryOperatorLValue(const BinaryOperator *E) { if (!hasAggregateLLVMType(E->getType())) { // Emit the LHS as an l-value. LValue LV = EmitLValue(E->getLHS()); - - llvm::Value *RHS = EmitScalarExpr(E->getRHS()); - EmitStoreOfScalar(RHS, LV.getAddress(), LV.isVolatileQualified(), - E->getType()); + // Sore the value through the l-value. + EmitStoreThroughLValue(EmitAnyExpr(E->getRHS()), LV, E->getType()); return LV; } |