1 // Check behaviour of -fvisibility-from-dllstorageclass options for PS4/PS5.
6 // DEFINE: %clang -### -target %{triple} %s -Werror -o - 2>&1 | \
7 // DEFINE: FileCheck %s --check-prefixes=DEFAULTS,%{prefix} \
8 // DEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
9 // DEFINE: --implicit-check-not=-fvisibility-dllexport \
10 // DEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
11 // DEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
12 // DEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass
13 // REDEFINE: %{prefix} = DEFAULTS-PS4
14 // REDEFINE: %{triple} = x86_64-scei-ps4
16 // REDEFINE: %{prefix} = DEFAULTS-PS5
17 // REDEFINE: %{triple} = x86_64-sie-ps5
20 // REDEFINE: %{run} = \
21 // REDEFINE: %clang -### -target %{triple} \
22 // REDEFINE: -fno-visibility-from-dllstorageclass \
23 // REDEFINE: -fvisibility-from-dllstorageclass \
24 // REDEFINE: -Werror \
25 // REDEFINE: %s -o - 2>&1 | \
26 // REDEFINE: FileCheck %s --check-prefixes=DEFAULTS,%{prefix} \
27 // REDEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
28 // REDEFINE: --implicit-check-not=-fvisibility-dllexport \
29 // REDEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
30 // REDEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
31 // REDEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass
32 // REDEFINE: %{prefix} = DEFAULTS-PS4
33 // REDEFINE: %{triple} = x86_64-scei-ps4
35 // REDEFINE: %{prefix} = DEFAULTS-PS5
36 // REDEFINE: %{triple} = x86_64-sie-ps5
39 // DEFAULTS: "-fvisibility-from-dllstorageclass"
40 // DEFAULTS-SAME: "-fvisibility-dllexport=protected"
41 // DEFAULTS-PS4-SAME: "-fvisibility-nodllstorageclass=hidden"
42 // DEFAULTS-PS5-SAME: "-fvisibility-nodllstorageclass=keep"
43 // DEFAULTS-SAME: "-fvisibility-externs-dllimport=default"
44 // DEFAULTS-PS4-SAME: "-fvisibility-externs-nodllstorageclass=default"
45 // DEFAULTS-PS5-SAME: "-fvisibility-externs-nodllstorageclass=keep"
47 // REDEFINE: %{run} = \
48 // REDEFINE: %clang -### -target %{triple} \
49 // REDEFINE: -fvisibility-from-dllstorageclass \
50 // REDEFINE: -fvisibility-dllexport=hidden \
51 // REDEFINE: -fvisibility-nodllstorageclass=protected \
52 // REDEFINE: -fvisibility-externs-dllimport=hidden \
53 // REDEFINE: -fvisibility-externs-nodllstorageclass=protected \
54 // REDEFINE: -fno-visibility-from-dllstorageclass \
55 // REDEFINE: %s -o - 2>&1 | \
56 // REDEFINE: FileCheck %s -check-prefix=UNUSED \
57 // REDEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
58 // REDEFINE: --implicit-check-not=-fvisibility-dllexport \
59 // REDEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
60 // REDEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
61 // REDEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass \
62 // REDEFINE: --implicit-check-not="warning: argument unused"
63 // REDEFINE: %{triple} = x86_64-scei-ps4
65 // REDEFINE: %{triple} = x86_64-sie-ps5
68 // UNUSED: warning: argument unused during compilation: '-fvisibility-dllexport=hidden'
69 // UNUSED-NEXT: warning: argument unused during compilation: '-fvisibility-nodllstorageclass=protected'
70 // UNUSED-NEXT: warning: argument unused during compilation: '-fvisibility-externs-dllimport=hidden'
71 // UNUSED-NEXT: warning: argument unused during compilation: '-fvisibility-externs-nodllstorageclass=protected'
73 // REDEFINE: %{run} = \
74 // REDEFINE: %clang -### -target %{triple} \
75 // REDEFINE: -fvisibility-nodllstorageclass=protected \
76 // REDEFINE: -fvisibility-externs-dllimport=hidden \
77 // REDEFINE: -Werror \
78 // REDEFINE: %s -o - 2>&1 | \
79 // REDEFINE: FileCheck %s -check-prefixes=SOME,%{prefix} \
80 // REDEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
81 // REDEFINE: --implicit-check-not=-fvisibility-dllexport \
82 // REDEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
83 // REDEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
84 // REDEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass
85 // REDEFINE: %{prefix} = SOME-PS4
86 // REDEFINE: %{triple} = x86_64-scei-ps4
88 // REDEFINE: %{prefix} = SOME-PS5
89 // REDEFINE: %{triple} = x86_64-sie-ps5
92 // REDEFINE: %{run} = \
93 // REDEFINE: %clang -### -target %{triple} \
94 // REDEFINE: -fvisibility-from-dllstorageclass \
95 // REDEFINE: -fvisibility-nodllstorageclass=protected \
96 // REDEFINE: -fvisibility-externs-dllimport=hidden \
97 // REDEFINE: -Werror \
98 // REDEFINE: %s -o - 2>&1 | \
99 // REDEFINE: FileCheck %s -check-prefixes=SOME,%{prefix} \
100 // REDEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
101 // REDEFINE: --implicit-check-not=-fvisibility-dllexport \
102 // REDEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
103 // REDEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
104 // REDEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass
105 // REDEFINE: %{prefix} = SOME-PS4
106 // REDEFINE: %{triple} = x86_64-scei-ps4
108 // REDEFINE: %{prefix} = SOME-PS5
109 // REDEFINE: %{triple} = x86_64-sie-ps5
112 // SOME: "-fvisibility-from-dllstorageclass"
113 // SOME-SAME: "-fvisibility-dllexport=protected"
114 // SOME-SAME: "-fvisibility-nodllstorageclass=protected"
115 // SOME-SAME: "-fvisibility-externs-dllimport=hidden"
116 // SOME-PS4-SAME: "-fvisibility-externs-nodllstorageclass=default"
117 // SOME-PS5-SAME: "-fvisibility-externs-nodllstorageclass=keep"
119 // REDEFINE: %{run} = \
120 // REDEFINE: %clang -### -target %{triple} \
121 // REDEFINE: -fvisibility-dllexport=default \
122 // REDEFINE: -fvisibility-dllexport=hidden \
123 // REDEFINE: -fvisibility-nodllstorageclass=default \
124 // REDEFINE: -fvisibility-nodllstorageclass=protected \
125 // REDEFINE: -fvisibility-externs-dllimport=default \
126 // REDEFINE: -fvisibility-externs-dllimport=hidden \
127 // REDEFINE: -fvisibility-externs-nodllstorageclass=default \
128 // REDEFINE: -fvisibility-externs-nodllstorageclass=protected \
129 // REDEFINE: -Werror \
130 // REDEFINE: %s -o - 2>&1 | \
131 // REDEFINE: FileCheck %s -check-prefix=ALL \
132 // REDEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
133 // REDEFINE: --implicit-check-not=-fvisibility-dllexport \
134 // REDEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
135 // REDEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
136 // REDEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass \
137 // REDEFINE: --implicit-check-not="warning: argument unused"
138 // REDEFINE: %{triple} = x86_64-scei-ps4
140 // REDEFINE: %{triple} = x86_64-sie-ps5
143 // REDEFINE: %{run} = \
144 // REDEFINE: %clang -### -target %{triple} \
145 // REDEFINE: -fvisibility-from-dllstorageclass \
146 // REDEFINE: -fvisibility-dllexport=default \
147 // REDEFINE: -fvisibility-dllexport=hidden \
148 // REDEFINE: -fvisibility-nodllstorageclass=default \
149 // REDEFINE: -fvisibility-nodllstorageclass=protected \
150 // REDEFINE: -fvisibility-externs-dllimport=default \
151 // REDEFINE: -fvisibility-externs-dllimport=hidden \
152 // REDEFINE: -fvisibility-externs-nodllstorageclass=default \
153 // REDEFINE: -fvisibility-externs-nodllstorageclass=protected \
154 // REDEFINE: -Werror \
155 // REDEFINE: %s -o - 2>&1 | \
156 // REDEFINE: FileCheck %s -check-prefix=ALL \
157 // REDEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
158 // REDEFINE: --implicit-check-not=-fvisibility-dllexport \
159 // REDEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
160 // REDEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
161 // REDEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass
162 // REDEFINE: %{triple} = x86_64-scei-ps4
164 // REDEFINE: %{triple} = x86_64-sie-ps5
167 // ALL: "-fvisibility-from-dllstorageclass"
168 // ALL-SAME: "-fvisibility-dllexport=hidden"
169 // ALL-SAME: "-fvisibility-nodllstorageclass=protected"
170 // ALL-SAME: "-fvisibility-externs-dllimport=hidden"
171 // ALL-SAME: "-fvisibility-externs-nodllstorageclass=protected"