2010-06-05 00:10:00 +08:00
|
|
|
// RUN: %clang_cc1 %s -fblocks -triple x86_64-apple-darwin -emit-llvm -o - | FileCheck %s
|
|
|
|
|
2010-06-09 01:52:11 +08:00
|
|
|
struct S {
|
|
|
|
S(const char *);
|
|
|
|
~S();
|
|
|
|
};
|
|
|
|
|
2010-06-05 00:10:00 +08:00
|
|
|
struct TestObject
|
|
|
|
{
|
2010-06-09 01:52:11 +08:00
|
|
|
TestObject(const TestObject& inObj, int def = 100, const S &Silly = "silly");
|
2010-06-05 00:10:00 +08:00
|
|
|
TestObject();
|
2010-06-09 04:57:22 +08:00
|
|
|
~TestObject();
|
2010-06-05 00:10:00 +08:00
|
|
|
TestObject& operator=(const TestObject& inObj);
|
|
|
|
int version() const;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
void testRoutine() {
|
|
|
|
TestObject one;
|
|
|
|
int (^V)() = ^{ return one.version(); };
|
|
|
|
}
|
|
|
|
|
2010-06-09 01:52:11 +08:00
|
|
|
// CHECK: call void @_ZN10TestObjectC1Ev
|
|
|
|
// CHECK: call void @_ZN1SC1EPKc
|
|
|
|
// CHECK: call void @_ZN10TestObjectC1ERKS_iRK1S
|
|
|
|
// CHECK: call void @_ZN1SD1Ev
|
2010-06-09 04:57:22 +08:00
|
|
|
// CHECK: call void @_ZN10TestObjectD1Ev
|
|
|
|
// CHECK: call void @_ZN10TestObjectD1Ev
|