xref: /llvm-project/clang/test/Driver/amdgpu-visibility.cl (revision 2f79bb10461d114783a1548201928549ace09755)
1// RUN: %clang -### -target amdgcn-amd-amdhsa -x cl -c -emit-llvm -nogpulib %s 2>&1 | FileCheck -check-prefix=DEFAULT %s
2// RUN: %clang -### -target amdgcn-amd-amdhsa -x cl -c -emit-llvm -fvisibility=protected -nogpulib %s 2>&1 | FileCheck -check-prefix=OVERRIDE-PROTECTED  %s
3// RUN: %clang -### -target amdgcn-amd-amdhsa -x cl -c -emit-llvm -fvisibility-ms-compat -nogpulib %s 2>&1 | FileCheck -check-prefix=OVERRIDE-MS  %s
4
5// RUN: %clang -### -target amdgcn-mesa-mesa3d -x cl -c -emit-llvm %s 2>&1 | FileCheck -check-prefix=DEFAULT %s
6// RUN: %clang -### -target amdgcn-mesa-mesa3d -x cl -c -emit-llvm -fvisibility=protected  %s 2>&1 | FileCheck -check-prefix=OVERRIDE-PROTECTED  %s
7// RUN: %clang -### -target amdgcn-mesa-mesa3d -x cl -c -emit-llvm -fvisibility-ms-compat  %s 2>&1 | FileCheck -check-prefix=OVERRIDE-MS  %s
8
9// DEFAULT-DAG: "-fvisibility=hidden"
10// DEFAULT-DAG: "-fapply-global-visibility-to-externs"
11
12// OVERRIDE-PROTECTED-NOT: "-fapply-global-visibility-to-externs"
13// OVERRIDE-PROTECTED: "-fvisibility=protected"
14// OVERRIDE-PROTECTED-NOT: "-fapply-global-visibility-to-externs"
15
16// OVERRIDE-MS-NOT: "-fapply-global-visibility-to-externs"
17// OVERRIDE-MS-DAG: "-fvisibility=hidden"
18// OVERRIDE-MS-DAG: "-ftype-visibility=default"
19// OVERRIDE-MS-NOT: "-fapply-global-visibility-to-externs"
20