1 // Check behaviour of -fvisibility-from-dllstorageclass options for PS4/PS5.
5 // DEFINE: %clang -### -target %{triple} %s -Werror -o - 2>&1 | \
6 // DEFINE: FileCheck %s --check-prefix=DEFAULTS \
7 // DEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
8 // DEFINE: --implicit-check-not=-fvisibility-dllexport \
9 // DEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
10 // DEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
11 // DEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass
12 // REDEFINE: %{triple} = x86_64-scei-ps4
14 // REDEFINE: %{triple} = x86_64-sie-ps5
17 // REDEFINE: %{run} = \
18 // REDEFINE: %clang -### -target %{triple} \
19 // REDEFINE: -fno-visibility-from-dllstorageclass \
20 // REDEFINE: -fvisibility-from-dllstorageclass \
21 // REDEFINE: -Werror \
22 // REDEFINE: %s -o - 2>&1 | \
23 // REDEFINE: FileCheck %s --check-prefix=DEFAULTS \
24 // REDEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
25 // REDEFINE: --implicit-check-not=-fvisibility-dllexport \
26 // REDEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
27 // REDEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
28 // REDEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass
29 // REDEFINE: %{triple} = x86_64-scei-ps4
31 // REDEFINE: %{triple} = x86_64-sie-ps5
34 // DEFAULTS: "-fvisibility-from-dllstorageclass"
35 // DEFAULTS-SAME: "-fvisibility-dllexport=protected"
36 // DEFAULTS-SAME: "-fvisibility-nodllstorageclass=hidden"
37 // DEFAULTS-SAME: "-fvisibility-externs-dllimport=default"
38 // DEFAULTS-SAME: "-fvisibility-externs-nodllstorageclass=default"
40 // REDEFINE: %{run} = \
41 // REDEFINE: %clang -### -target x86_64-scei-ps4 \
42 // REDEFINE: -fvisibility-from-dllstorageclass \
43 // REDEFINE: -fvisibility-dllexport=hidden \
44 // REDEFINE: -fvisibility-nodllstorageclass=protected \
45 // REDEFINE: -fvisibility-externs-dllimport=hidden \
46 // REDEFINE: -fvisibility-externs-nodllstorageclass=protected \
47 // REDEFINE: -fno-visibility-from-dllstorageclass \
48 // REDEFINE: %s -o - 2>&1 | \
49 // REDEFINE: FileCheck %s -check-prefix=UNUSED \
50 // REDEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
51 // REDEFINE: --implicit-check-not=-fvisibility-dllexport \
52 // REDEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
53 // REDEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
54 // REDEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass \
55 // REDEFINE: --implicit-check-not=warning:
56 // REDEFINE: %{triple} = x86_64-scei-ps4
58 // REDEFINE: %{triple} = x86_64-sie-ps5
61 // UNUSED: warning: argument unused during compilation: '-fvisibility-dllexport=hidden'
62 // UNUSED-NEXT: warning: argument unused during compilation: '-fvisibility-nodllstorageclass=protected'
63 // UNUSED-NEXT: warning: argument unused during compilation: '-fvisibility-externs-dllimport=hidden'
64 // UNUSED-NEXT: warning: argument unused during compilation: '-fvisibility-externs-nodllstorageclass=protected'
66 // REDEFINE: %{run} = \
67 // REDEFINE: %clang -### -target x86_64-scei-ps4 \
68 // REDEFINE: -fvisibility-nodllstorageclass=protected \
69 // REDEFINE: -fvisibility-externs-dllimport=hidden \
70 // REDEFINE: -Werror \
71 // REDEFINE: %s -o - 2>&1 | \
72 // REDEFINE: FileCheck %s -check-prefix=SOME \
73 // REDEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
74 // REDEFINE: --implicit-check-not=-fvisibility-dllexport \
75 // REDEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
76 // REDEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
77 // REDEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass
78 // REDEFINE: %{triple} = x86_64-scei-ps4
80 // REDEFINE: %{triple} = x86_64-sie-ps5
83 // REDEFINE: %{run} = \
84 // REDEFINE: %clang -### -target x86_64-scei-ps4 \
85 // REDEFINE: -fvisibility-from-dllstorageclass \
86 // REDEFINE: -fvisibility-nodllstorageclass=protected \
87 // REDEFINE: -fvisibility-externs-dllimport=hidden \
88 // REDEFINE: -Werror \
89 // REDEFINE: %s -o - 2>&1 | \
90 // REDEFINE: FileCheck %s -check-prefix=SOME \
91 // REDEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
92 // REDEFINE: --implicit-check-not=-fvisibility-dllexport \
93 // REDEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
94 // REDEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
95 // REDEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass
96 // REDEFINE: %{triple} = x86_64-scei-ps4
98 // REDEFINE: %{triple} = x86_64-sie-ps5
101 // SOME: "-fvisibility-from-dllstorageclass"
102 // SOME-SAME: "-fvisibility-dllexport=protected"
103 // SOME-SAME: "-fvisibility-nodllstorageclass=protected"
104 // SOME-SAME: "-fvisibility-externs-dllimport=hidden"
105 // SOME-SAME: "-fvisibility-externs-nodllstorageclass=default"
107 // REDEFINE: %{run} = \
108 // REDEFINE: %clang -### -target x86_64-scei-ps4 \
109 // REDEFINE: -fvisibility-dllexport=default \
110 // REDEFINE: -fvisibility-dllexport=hidden \
111 // REDEFINE: -fvisibility-nodllstorageclass=default \
112 // REDEFINE: -fvisibility-nodllstorageclass=protected \
113 // REDEFINE: -fvisibility-externs-dllimport=default \
114 // REDEFINE: -fvisibility-externs-dllimport=hidden \
115 // REDEFINE: -fvisibility-externs-nodllstorageclass=default \
116 // REDEFINE: -fvisibility-externs-nodllstorageclass=protected \
117 // REDEFINE: -Werror \
118 // REDEFINE: %s -o - 2>&1 | \
119 // REDEFINE: FileCheck %s -check-prefix=ALL \
120 // REDEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
121 // REDEFINE: --implicit-check-not=-fvisibility-dllexport \
122 // REDEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
123 // REDEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
124 // REDEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass
125 // REDEFINE: %{triple} = x86_64-scei-ps4
127 // REDEFINE: %{triple} = x86_64-sie-ps5
130 // REDEFINE: %{run} = \
131 // REDEFINE: %clang -### -target x86_64-scei-ps4 \
132 // REDEFINE: -fvisibility-from-dllstorageclass \
133 // REDEFINE: -fvisibility-dllexport=default \
134 // REDEFINE: -fvisibility-dllexport=hidden \
135 // REDEFINE: -fvisibility-nodllstorageclass=default \
136 // REDEFINE: -fvisibility-nodllstorageclass=protected \
137 // REDEFINE: -fvisibility-externs-dllimport=default \
138 // REDEFINE: -fvisibility-externs-dllimport=hidden \
139 // REDEFINE: -fvisibility-externs-nodllstorageclass=default \
140 // REDEFINE: -fvisibility-externs-nodllstorageclass=protected \
141 // REDEFINE: -Werror \
142 // REDEFINE: %s -o - 2>&1 | \
143 // REDEFINE: FileCheck %s -check-prefix=ALL \
144 // REDEFINE: --implicit-check-not=-fvisibility-from-dllstorageclass \
145 // REDEFINE: --implicit-check-not=-fvisibility-dllexport \
146 // REDEFINE: --implicit-check-not=-fvisibility-nodllstorageclass \
147 // REDEFINE: --implicit-check-not=-fvisibility-externs-dllimport \
148 // REDEFINE: --implicit-check-not=-fvisibility-externs-nodllstorageclass
149 // REDEFINE: %{triple} = x86_64-scei-ps4
151 // REDEFINE: %{triple} = x86_64-sie-ps5
154 // ALL: "-fvisibility-from-dllstorageclass"
155 // ALL-SAME: "-fvisibility-dllexport=hidden"
156 // ALL-SAME: "-fvisibility-nodllstorageclass=protected"
157 // ALL-SAME: "-fvisibility-externs-dllimport=hidden"
158 // ALL-SAME: "-fvisibility-externs-nodllstorageclass=protected"