Anders Carlsson | 7a039eb | 2009-08-15 22:30:50 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -emit-llvm %s -o %t -triple=x86_64-apple-darwin9 && |
| 2 | struct A { |
| 3 | A(); |
| 4 | ~A(); |
| 5 | void f(); |
| 6 | }; |
| 7 | |
Anders Carlsson | ec74c59 | 2009-08-16 03:06:32 +0000 | [diff] [blame^] | 8 | // RUN: grep "call void @_ZN1AC1Ev" %t | count 2 && |
| 9 | // RUN: grep "call void @_ZN1AD1Ev" %t | count 2 && |
| 10 | void f1() { |
| 11 | (void)A(); |
Anders Carlsson | 7a039eb | 2009-08-15 22:30:50 +0000 | [diff] [blame] | 12 | A().f(); |
| 13 | } |
Anders Carlsson | ec74c59 | 2009-08-16 03:06:32 +0000 | [diff] [blame^] | 14 | |
| 15 | // Calls |
| 16 | struct B { |
| 17 | B(); |
| 18 | ~B(); |
| 19 | }; |
| 20 | |
| 21 | B g(); |
| 22 | |
| 23 | // RUN: grep "call void @_ZN1BC1Ev" %t | count 0 && |
| 24 | // RUN: grep "call void @_ZN1BD1Ev" %t | count 1 |
| 25 | void f2() { |
| 26 | (void)g(); |
| 27 | } |
| 28 | |