aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-05-20 21:38:57 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-05-20 21:38:57 +0000
commit842ddd0391eb799edfed05f0c5019d6f720d2c37 (patch)
tree2e097ed7b3d3d920382505533fe7883ba12c2af3 /lib/CodeGen
parent20a9aa50f9a7d4b03f97bc67e96da1d605c309a2 (diff)
Adds support for generation of objc_memmove_collectable API
in Objective-C++ mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGExprCXX.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp
index eccb6e6aab..f93c79c742 100644
--- a/lib/CodeGen/CGExprCXX.cpp
+++ b/lib/CodeGen/CGExprCXX.cpp
@@ -12,6 +12,7 @@
//===----------------------------------------------------------------------===//
#include "CodeGenFunction.h"
+#include "CGObjCRuntime.h"
using namespace clang;
using namespace CodeGen;
@@ -274,7 +275,10 @@ CodeGenFunction::EmitCXXOperatorMemberCallExpr(const CXXOperatorCallExpr *E,
llvm::Value *Src = EmitLValue(E->getArg(1)).getAddress();
QualType Ty = E->getType();
- EmitAggregateCopy(This, Src, Ty);
+ if (ClassDecl->hasObjectMember())
+ CGM.getObjCRuntime().EmitGCMemmoveCollectable(*this, This, Src, Ty);
+ else
+ EmitAggregateCopy(This, Src, Ty);
return RValue::get(This);
}
}