1 // REQUIRES: x86-registered-target
3 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t1.pch %S/Inputs/chain-external-defs1.h
4 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t2.pch %S/Inputs/chain-external-defs2.h -include-pch %t1.pch
5 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -include-pch %t2.pch -emit-llvm -o %t %s
6 // RUN: echo FINI >> %t
7 // RUN: FileCheck -input-file=%t -check-prefix=Z %s
8 // RUN: FileCheck -input-file=%t -check-prefix=XA %s
9 // RUN: FileCheck -input-file=%t -check-prefix=YA %s
10 // RUN: FileCheck -input-file=%t -check-prefix=XB %s
11 // RUN: FileCheck -input-file=%t -check-prefix=YB %s
12 // RUN: FileCheck -input-file=%t -check-prefix=AA %s
13 // RUN: FileCheck -input-file=%t -check-prefix=AB %s
14 // RUN: FileCheck -input-file=%t -check-prefix=AC %s
15 // RUN: FileCheck -input-file=%t -check-prefix=S %s
19 // XA: @x ={{.*}} global i32 0
20 // XA-NOT: @x ={{.*}} global i32 0
22 // YA: @y ={{.*}} global i32 0
23 // YA-NOT: @y ={{.*}} global i32 0
25 // XB: @x2 ={{.*}} global i32 19
26 // XB-NOT: @x2 ={{.*}} global i32 19
28 // YB: @y2 ={{.*}} global i32 18
29 // YB-NOT: @y2 ={{.*}} global i32 18
32 // AA: @incomplete_array ={{.*}} global [1 x i32]
33 // AA-NOT: @incomplete_array ={{.*}} global [1 x i32]
34 // AB: @incomplete_array2 ={{.*}} global [17 x i32]
35 // AB-NOT: @incomplete_array2 ={{.*}} global [17 x i32]
36 int incomplete_array2
[17];
37 // AC: @incomplete_array3 ={{.*}} global [1 x i32]
38 // AC-NOT: @incomplete_array3 ={{.*}} global [1 x i32]
39 int incomplete_array3
[];
41 // S: @s ={{.*}} global %struct.S
42 // S-NOT: @s ={{.*}} global %struct.S