blob: bdfca5e4ee0a21ea0bf47f68f0643063aaa8823e [file] [log] [blame]
Fariborz Jahaniandf8b8ea2010-06-04 16:10:00 +00001// RUN: %clang_cc1 %s -fblocks -triple x86_64-apple-darwin -emit-llvm -o - | FileCheck %s
2
Fariborz Jahaniand7c73382010-06-08 17:52:11 +00003struct S {
4 S(const char *);
5 ~S();
6};
7
Fariborz Jahaniandf8b8ea2010-06-04 16:10:00 +00008struct TestObject
9{
Fariborz Jahaniand7c73382010-06-08 17:52:11 +000010 TestObject(const TestObject& inObj, int def = 100, const S &Silly = "silly");
Fariborz Jahaniandf8b8ea2010-06-04 16:10:00 +000011 TestObject();
Fariborz Jahanianac7362d2010-06-08 20:57:22 +000012 ~TestObject();
Fariborz Jahaniandf8b8ea2010-06-04 16:10:00 +000013 TestObject& operator=(const TestObject& inObj);
14 int version() const;
15
16};
17
18void testRoutine() {
19 TestObject one;
20 int (^V)() = ^{ return one.version(); };
21}
22
Fariborz Jahaniand7c73382010-06-08 17:52:11 +000023// CHECK: call void @_ZN10TestObjectC1Ev
24// CHECK: call void @_ZN1SC1EPKc
25// CHECK: call void @_ZN10TestObjectC1ERKS_iRK1S
26// CHECK: call void @_ZN1SD1Ev
Fariborz Jahanianac7362d2010-06-08 20:57:22 +000027// CHECK: call void @_ZN10TestObjectD1Ev
28// CHECK: call void @_ZN10TestObjectD1Ev