summaryrefslogtreecommitdiff
path: root/test/Driver/amdgpu-visibility.cl
diff options
context:
space:
mode:
Diffstat (limited to 'test/Driver/amdgpu-visibility.cl')
-rw-r--r--test/Driver/amdgpu-visibility.cl7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Driver/amdgpu-visibility.cl b/test/Driver/amdgpu-visibility.cl
new file mode 100644
index 000000000000..35969db0340e
--- /dev/null
+++ b/test/Driver/amdgpu-visibility.cl
@@ -0,0 +1,7 @@
+// RUN: %clang -### -target amdgcn-amd-amdhsa -x cl -c -emit-llvm %s 2>&1 | FileCheck -check-prefix=DEFAULT %s
+// RUN: %clang -### -target amdgcn-amd-amdhsa -x cl -c -emit-llvm -fvisibility=protected %s 2>&1 | FileCheck -check-prefix=OVERRIDE-PROTECTED %s
+// RUN: %clang -### -target amdgcn-amd-amdhsa -x cl -c -emit-llvm -fvisibility-ms-compat %s 2>&1 | FileCheck -check-prefix=OVERRIDE-MS %s
+
+// DEFAULT: "-fvisibility" "hidden"
+// OVERRIDE-PROTECTED: "-fvisibility" "protected"
+// OVERRIDE-MS: "-fvisibility" "hidden" "-ftype-visibility" "default"