Ted Kremenek | ebcb57a | 2012-03-06 20:05:56 +0000 | [diff] [blame] | 1 | // Test this without pch. |
| 2 | // RUN: %clang_cc1 -include %S/objc_container.h -fsyntax-only -verify %s |
| 3 | |
| 4 | // Test with pch. |
| 5 | // RUN: %clang_cc1 -x objective-c -emit-pch -o %t %S/objc_container.h |
| 6 | // RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s |
David Tweed | a0d5878 | 2012-10-25 13:56:30 +0000 | [diff] [blame] | 7 | // RUN: %clang_cc1 -include-pch %t -ast-print %s | FileCheck -check-prefix=PRINT %s |
| 8 | // RUN: %clang_cc1 -include-pch %t -emit-llvm -o - %s | FileCheck -check-prefix=IR %s |
Ted Kremenek | ebcb57a | 2012-03-06 20:05:56 +0000 | [diff] [blame] | 9 | |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 10 | // expected-no-diagnostics |
| 11 | |
Ted Kremenek | ebcb57a | 2012-03-06 20:05:56 +0000 | [diff] [blame] | 12 | // CHECK-PRINT: id oldObject = array[10]; |
| 13 | // CHECK-PRINT: array[10] = oldObject; |
| 14 | // CHECK-PRINT: oldObject = dictionary[key]; |
| 15 | // CHECK-PRINT: dictionary[key] = newObject; |
| 16 | |
Bill Wendling | f7a9da0 | 2013-02-20 07:22:19 +0000 | [diff] [blame] | 17 | // CHECK-IR: define void @all() #0 |
Ted Kremenek | ebcb57a | 2012-03-06 20:05:56 +0000 | [diff] [blame] | 18 | // CHECK-IR: {{call.*objc_msgSend}} |
| 19 | // CHECK-IR: {{call.*objc_msgSend}} |
| 20 | // CHECK-IR: {{call.*objc_msgSend}} |
| 21 | // CHECK-IR: {{call.*objc_msgSend}} |
| 22 | // CHECK-IR: ret void |
Bill Wendling | f7a9da0 | 2013-02-20 07:22:19 +0000 | [diff] [blame] | 23 | |
| 24 | // CHECK: attributes #0 = { nounwind {{.*}} } |
| 25 | // CHECK: attributes #1 = { nonlazybind } |