summaryrefslogtreecommitdiff
path: root/test/CodeGenOpenCL/const-str-array-decay.cl
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
commit06d4ba388873e6d1cfa9cd715a8935ecc8cd2097 (patch)
tree3eb853da77d46cc77c4b017525a422f9ddb1385b /test/CodeGenOpenCL/const-str-array-decay.cl
parent30d791273d07fac9c0c1641a0731191bca6e8606 (diff)
Notes
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 000000000000..dbbe08989cb1
--- /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
+