blob: 1852d5e0750c06e34ae1081da3a9d2d825fa0ca8 [file] [log] [blame]
Ted Kremeneke65b0862012-03-06 20:05:56 +00001// 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
Tim Northover19ae1172013-08-12 12:51:05 +00007// RUN: %clang_cc1 -include-pch %t -ast-print %s | FileCheck -check-prefix=CHECK-PRINT %s
8// RUN: %clang_cc1 -include-pch %t -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-IR %s
Ted Kremeneke65b0862012-03-06 20:05:56 +00009
Andy Gibbsc6e68da2012-10-19 12:44:48 +000010// expected-no-diagnostics
11
Ted Kremeneke65b0862012-03-06 20:05:56 +000012// 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
David Blaikieea3e51d2015-06-29 17:29:50 +000017// CHECK-IR: define {{.*}}void @all() #0
Ted Kremeneke65b0862012-03-06 20:05:56 +000018// 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 Wendlingc33fc4c2013-02-20 07:22:19 +000023
Chandler Carruthfcd33142016-12-23 01:24:49 +000024// CHECK-IR: attributes #0 = { noinline nounwind {{.*}} }
Nico Riecke6a158252014-02-16 07:29:41 +000025// CHECK-IR: attributes #1 = { nonlazybind }