summaryrefslogtreecommitdiffstats
path: root/test/CodeGenOpenCL/const-str-array-decay.cl
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenOpenCL/const-str-array-decay.cl')
-rw-r--r--test/CodeGenOpenCL/const-str-array-decay.cl11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenOpenCL/const-str-array-decay.cl b/test/CodeGenOpenCL/const-str-array-decay.cl
new file mode 100644
index 0000000..dbbe089
--- /dev/null
+++ b/test/CodeGenOpenCL/const-str-array-decay.cl
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -ffake-address-space-map | FileCheck %s
+
+int test_func(constant char* foo);
+
+kernel void str_array_decy() {
+ test_func("Test string literal");
+}
+
+// CHECK: i8 addrspace(3)* getelementptr inbounds ([20 x i8] addrspace(3)*
+// CHECK-NOT: addrspacecast
+
OpenPOWER on IntegriCloud