aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-08-14 00:01:54 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-08-14 00:01:54 +0000
commit183d7181fd59842ac969cbc6fe0376f85dc63ae4 (patch)
treed43f3d5fa1b2d8f0a3878c9bd8c08ae123257e73 /lib/CodeGen/CGCXX.cpp
parent788467852cfbd940c796537849db5beef20253e8 (diff)
Fixed a bug in ir-gen for copy assignment synthesis.
Fixed a bug when evaluating those copy-assignments which need by lazily syntheized. A test case for these. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78965 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r--lib/CodeGen/CGCXX.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 24e87f521f..4460a254b7 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -1045,7 +1045,10 @@ void CodeGenFunction::SynthesizeCXXCopyAssignment(const CXXMethodDecl *CD,
LValue RHS = EmitLValueForField(LoadOfSrc, *Field, false, 0);
RValue RVRHS = EmitLoadOfLValue(RHS, FieldType);
EmitStoreThroughLValue(RVRHS, LHS, FieldType);
- }
+ }
+
+ // return *this;
+ Builder.CreateStore(LoadOfThis, ReturnValue);
FinishFunction();
}