diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-04 16:10:00 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-04 16:10:00 +0000 |
commit | df8b8ea3492a314488ffee72704665b22bc73989 (patch) | |
tree | 00186c63fcc5b1f797766a960ab0b48d933bc44f /test/CodeGenCXX/copy-in-cplus-object.cpp | |
parent | e7d6c2cae6a9b9985db02cfc8bb4e7b714630ed5 (diff) |
For C++ copied in objects, use copy constructors in
setting up block's descriptor. This is on going work to
support c++ specific issues in setting up blocks
various APIs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/copy-in-cplus-object.cpp')
-rw-r--r-- | test/CodeGenCXX/copy-in-cplus-object.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenCXX/copy-in-cplus-object.cpp b/test/CodeGenCXX/copy-in-cplus-object.cpp new file mode 100644 index 0000000000..6dcb1285fa --- /dev/null +++ b/test/CodeGenCXX/copy-in-cplus-object.cpp @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 %s -fblocks -triple x86_64-apple-darwin -emit-llvm -o - | FileCheck %s + +struct TestObject +{ + TestObject(const TestObject& inObj); + TestObject(); + TestObject& operator=(const TestObject& inObj); + int version() const; + +}; + +void testRoutine() { + TestObject one; + int (^V)() = ^{ return one.version(); }; +} + +// CHECK: call void @_ZN10TestObjectC1ERKS_ + |