brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 909a861 Raw
56 lines · c
1// REQUIRES: x86-registered-target2// Test with pch.3// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t1.pch %S/Inputs/chain-external-defs1.h4// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t2.pch %S/Inputs/chain-external-defs2.h -include-pch %t1.pch5// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -include-pch %t2.pch -emit-llvm -o %t %s6// RUN: echo FINI >> %t7// RUN: FileCheck -input-file=%t -check-prefix=Z %s8// RUN: FileCheck -input-file=%t -check-prefix=XA %s9// RUN: FileCheck -input-file=%t -check-prefix=YA %s10// RUN: FileCheck -input-file=%t -check-prefix=XB %s11// RUN: FileCheck -input-file=%t -check-prefix=YB %s12// RUN: FileCheck -input-file=%t -check-prefix=AA %s13// RUN: FileCheck -input-file=%t -check-prefix=AB %s14// RUN: FileCheck -input-file=%t -check-prefix=AC %s15// RUN: FileCheck -input-file=%t -check-prefix=S %s16 17// Z-NOT: @z18 19// XA: @x ={{.*}} global i32 020// XA-NOT: @x ={{.*}} global i32 021 22// YA: @y ={{.*}} global i32 023// YA-NOT: @y ={{.*}} global i32 024 25// XB: @x2 ={{.*}} global i32 1926// XB-NOT: @x2 ={{.*}} global i32 1927int x2 = 19;28// YB: @y2 ={{.*}} global i32 1829// YB-NOT: @y2 ={{.*}} global i32 1830int y2 = 18;31 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]36int incomplete_array2[17];37// AC: @incomplete_array3 ={{.*}} global [1 x i32]38// AC-NOT: @incomplete_array3 ={{.*}} global [1 x i32]39int incomplete_array3[];40 41// S: @s ={{.*}} global %struct.S42// S-NOT: @s ={{.*}} global %struct.S43struct S {44  int x, y;45};46 47// Z: FINI48// XA: FINI49// YA: FINI50// XB: FINI51// YB: FINI52// AA: FINI53// AB: FINI54// AC: FINI55// S: FINI56