[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / toc-conf.c
blob7b2d5122ebc6ce4648c035f34e270c7652070052
1 // RUN: %clang %s --target=powerpc-unknown-aix -mno-tocdata -mtocdata -mno-tocdata -### 2>&1 | FileCheck %s -check-prefix=CHECK-FLAG1
2 // RUN: %clang %s --target=powerpc-unknown-aix -mno-tocdata -mtocdata -mno-tocdata -mtocdata -### 2>&1 | FileCheck %s -check-prefix=CHECK-FLAG2
3 // RUN: %clang %s --target=powerpc-unknown-aix -mtocdata=g1,g2 -mno-tocdata=g2 -mtocdata=g3,g4 -mno-tocdata=g5,g1 -### 2>&1 | FileCheck %s -check-prefix=CHECK-EQCONF
4 // RUN: %clang %s --target=powerpc-unknown-aix -mtocdata=g1 -mtocdata -mno-tocdata -mtocdata=g2,g3 -mno-tocdata=g4,g5,g3 -### 2>&1 | FileCheck %s -check-prefix=CHECK-CONF1
5 // RUN: %clang %s --target=powerpc-unknown-aix -mno-tocdata=g1 -mno-tocdata -mtocdata -### 2>&1 | FileCheck %s -check-prefix=CHECK-CONF2
7 int g1, g4, g5;
8 extern int g2;
9 int g3 = 0;
10 void func() {
11 g2 = 0;
14 // CHECK-FLAG1-NOT: warning:
15 // CHECK-FLAG1: "-cc1"{{.*}}" "-mno-tocdata"
17 // CHECK-FLAG2-NOT: warning:
18 // CHECK-FLAG2: "-cc1"{{.*}}" "-mtocdata"
20 // CHECK-EQCONF-NOT: warning:
21 // CHECK-EQCONF: "-cc1"{{.*}}" "-mno-tocdata"
22 // CHECK-EQCONF: "-mtocdata=g3,g4"
24 // CHECK-CONF1-NOT: warning:
25 // CHECK-CONF1: "-cc1"{{.*}}" "-mno-tocdata"
26 // CHECK-CONF1: "-mtocdata=g1,g2"
28 // CHECK-CONF2-NOT: warning:
29 // CHECK-CONF2: "-cc1"{{.*}}" "-mtocdata"
30 // CHECK-CONF2: "-mno-tocdata=g1"