[AMDGPU][True16][CodeGen] true16 codegen pattern for v_med3_u/i16 (#121850)
[llvm-project.git] / clang / test / CodeGenCXX / lto-visibility-inference.cpp
blobe7ce3436a88b13cc1c5925012b663168caa1a51e
1 // RUN: %clang_cc1 -flto -triple x86_64-unknown-linux -std=c++11 -fms-extensions -fvisibility=hidden -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=ITANIUM %s
2 // RUN: %clang_cc1 -flto -triple x86_64-pc-windows-msvc -std=c++11 -fms-extensions -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=MS --check-prefix=MS-STD %s
3 // RUN: %clang_cc1 -flto -triple x86_64-pc-windows-msvc -std=c++11 -fms-extensions -fwhole-program-vtables -flto-visibility-public-std -emit-llvm -o - %s | FileCheck --check-prefix=MS --check-prefix=MS-NOSTD %s
5 struct C1 {
6 virtual void f();
7 };
9 struct __attribute__((visibility("default"))) C2 {
10 virtual void f();
13 struct __declspec(dllexport) C3 {
14 virtual void f();
17 struct __declspec(dllimport) C4 {
18 virtual void f();
21 struct [[clang::lto_visibility_public]] C5 {
22 virtual void f();
25 struct __declspec(uuid("00000000-0000-0000-0000-000000000000")) C6 {
26 virtual void f();
29 namespace std {
31 struct C7 {
32 virtual void f();
33 struct C8 {
34 virtual void f();
40 extern "C++" {
42 namespace stdext {
44 struct C9 {
45 virtual void f();
52 namespace other {
54 struct C10 {
55 virtual void f();
60 namespace {
62 struct C11 {
63 virtual void f();
68 void f(C1 *c1, C2 *c2, C3 *c3, C4 *c4, C5 *c5, C6 *c6, std::C7 *c7,
69 std::C7::C8 *c8, stdext::C9 *c9, other::C10 *c10) {
70 // ITANIUM: type.test{{.*}}!"_ZTS2C1"
71 // MS: type.test{{.*}}!"?AUC1@@"
72 c1->f();
73 // ITANIUM: type.test{{.*}}!"_ZTS2C2"
74 // MS: type.test{{.*}}!"?AUC2@@"
75 c2->f();
76 // ITANIUM: type.test{{.*}}!"_ZTS2C3"
77 // MS-NOT: type.test{{.*}}!"?AUC3@@"
78 c3->f();
79 // ITANIUM: type.test{{.*}}!"_ZTS2C4"
80 // MS-NOT: type.test{{.*}}!"?AUC4@@"
81 c4->f();
82 // ITANIUM-NOT: type.test{{.*}}!"_ZTS2C5"
83 // MS-NOT: type.test{{.*}}!"?AUC5@@"
84 c5->f();
85 // ITANIUM-NOT: type.test{{.*}}!"_ZTS2C6"
86 // MS-NOT: type.test{{.*}}!"?AUC6@@"
87 c6->f();
88 // ITANIUM: type.test{{.*}}!"_ZTSSt2C7"
89 // MS-STD: type.test{{.*}}!"?AUC7@std@@"
90 // MS-NOSTD-NOT: type.test{{.*}}!"?AUC7@std@@"
91 c7->f();
92 // ITANIUM: type.test{{.*}}!"_ZTSNSt2C72C8E"
93 // MS-STD: type.test{{.*}}!"?AUC8@C7@std@@"
94 // MS-NOSTD-NOT: type.test{{.*}}!"?AUC8@C7@std@@"
95 c8->f();
96 // ITANIUM: type.test{{.*}}!"_ZTSN6stdext2C9E"
97 // MS-STD: type.test{{.*}}!"?AUC9@stdext@@"
98 // MS-NOSTD-NOT: type.test{{.*}}!"?AUC9@stdext@@"
99 c9->f();
100 // ITANIUM: type.test{{.*}}!"_ZTSN5other3C10E"
101 // MS: type.test{{.*}}!"?AUC10@other@@"
102 c10->f();
103 // ITANIUM: type.test{{.*}}!{{[0-9]}}
104 // MS: type.test{{.*}}!{{[0-9]}}
105 C11 *c11;
106 c11->f();