aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/blocks-opencl.cl
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/blocks-opencl.cl')
-rw-r--r--test/CodeGen/blocks-opencl.cl7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/CodeGen/blocks-opencl.cl b/test/CodeGen/blocks-opencl.cl
index d3562988b738..61c479b7b98e 100644
--- a/test/CodeGen/blocks-opencl.cl
+++ b/test/CodeGen/blocks-opencl.cl
@@ -2,15 +2,16 @@
// This used to crash due to trying to generate a bitcase from a cstring
// in the constant address space to i8* in AS0.
-void dummy(float (^op)(float))
-{
+void dummy(float (^const op)(float)) {
}
// CHECK: i8 addrspace(3)* getelementptr inbounds ([9 x i8], [9 x i8] addrspace(3)* @.str, i32 0, i32 0)
kernel void test_block()
{
- float (^X)(float) = ^(float x) { return x + 42.0f; };
+ float (^const X)(float) = ^(float x) {
+ return x + 42.0f;
+ };
dummy(X);
}