Daniel Dunbar | 55a759b | 2009-08-23 19:28:59 +0000 | [diff] [blame^] | 1 | // FIXME: We forcibly strip the names so that the test doesn't vary between |
| 2 | // builds with and without asserts. We need a better solution for this. |
| 3 | |
| 4 | // RUN: clang-cc -fblocks -triple x86_64-apple-darwin10 -emit-llvm-bc -o - %s | opt -strip | llvm-dis > %t && |
| 5 | // RUN: grep '%7 = call i32 (...)\* @rhs()' %t | count 1 && |
| 6 | // RUN: grep '%8 = getelementptr inbounds %0\* %1, i32 0, i32 1' %t | count 1 && |
| 7 | // RUN: grep '%9 = bitcast i8\*\* %8 to %0\*\*' %t | count 1 && |
| 8 | // RUN: grep '%10 = load %0\*\* %9' %t | count 1 && |
| 9 | // RUN: grep '%12 = call i32 (...)\* @rhs()' %t | count 1 && |
| 10 | // RUN: grep '%13 = getelementptr inbounds %0\* %1, i32 0, i32 1' %t | count 1 && |
| 11 | // RUN: grep '%14 = bitcast i8\*\* %13 to %0\*\*' %t | count 1 && |
| 12 | // RUN: grep '%15 = load %0\*\* %14' %t | count 1 |
Mike Stump | 99459b6 | 2009-05-21 21:05:15 +0000 | [diff] [blame] | 13 | |
| 14 | int rhs(); |
| 15 | |
| 16 | void foo() { |
| 17 | __block int i; |
| 18 | i = rhs(); |
Mike Stump | cc0442f | 2009-05-22 19:07:20 +0000 | [diff] [blame] | 19 | i += rhs(); |
Mike Stump | 99459b6 | 2009-05-21 21:05:15 +0000 | [diff] [blame] | 20 | } |