diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-05-20 21:38:57 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-05-20 21:38:57 +0000 |
| commit | 60d215b6fde739b78afd9acb6648cf85f099dc49 (patch) | |
| tree | 3b5697673a7f42ca46cae9e337f6df5eadbd7933 /clang/lib/CodeGen | |
| parent | 4f5e79c67deace3d07d90ab91057d53312e0cf5d (diff) | |
| download | bcm5719-llvm-60d215b6fde739b78afd9acb6648cf85f099dc49.tar.gz bcm5719-llvm-60d215b6fde739b78afd9acb6648cf85f099dc49.zip | |
Adds support for generation of objc_memmove_collectable API
in Objective-C++ mode.
llvm-svn: 104281
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index eccb6e6aab5..f93c79c7426 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/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); } } |

