[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CodeGenCXX / aix-constructor-attribute.cpp
blob91c8d16158be10cc85e50bd788a8c32f4814298f
1 // RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -x c++ -emit-llvm \
2 // RUN: -fno-use-cxa-atexit < %s |\
3 // RUN: FileCheck %s
4 // RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -x c++ -emit-llvm \
5 // RUN: -fno-use-cxa-atexit < %s | \
6 // RUN: FileCheck %s
8 // CHECK: @llvm.global_ctors = appending global [4 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* bitcast (i32 ()* @_Z4foo3v to void ()*), i8* null }, { i32, void ()*, i8* } { i32 180, void ()* bitcast (i32 ()* @_Z4foo2v to void ()*), i8* null }, { i32, void ()*, i8* } { i32 180, void ()* bitcast (i32 ()* @_Z3foov to void ()*), i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I__, i8* null }]
9 // CHECK: @llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__D_a, i8* null }]
11 int foo() __attribute__((constructor(180)));
12 int foo2() __attribute__((constructor(180)));
13 int foo3() __attribute__((constructor(65535)));
15 struct Test {
16 public:
17 Test() {}
18 ~Test() {}
19 } t;
21 int foo3() {
22 return 3;
25 int foo2() {
26 return 2;
29 int foo() {
30 return 1;