summaryrefslogtreecommitdiff
path: root/test/CodeGenOpenCL/private-array-initialization.cl
diff options
context:
space:
mode:
authorJF Bastien <jfbastien@apple.com>2018-11-15 00:19:18 +0000
committerJF Bastien <jfbastien@apple.com>2018-11-15 00:19:18 +0000
commit64adb335c2a5ab327198523dbe07e8f5e0922ac3 (patch)
treef453b4226d91bc49f42c308e57e1120249ddfa94 /test/CodeGenOpenCL/private-array-initialization.cl
parentcb3989d3ad3cd59b735b5a68f70461a925991f73 (diff)
downloadclang-64adb335c2a5ab327198523dbe07e8f5e0922ac3.tar.gz
CGDecl::emitStoresForConstant fix synthesized constant's name
Summary: The name of the synthesized constants for constant initialization was using mangling for statics, which isn't generally correct and (in a yet-uncommitted patch) causes the mangler to assert out because the static ends up trying to mangle function parameters and this makes no sense. Instead, mangle to `"__const." + FunctionName + "." + DeclName`. Reviewers: rjmccall Subscribers: dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D54055 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenOpenCL/private-array-initialization.cl')
-rw-r--r--test/CodeGenOpenCL/private-array-initialization.cl4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/CodeGenOpenCL/private-array-initialization.cl b/test/CodeGenOpenCL/private-array-initialization.cl
index 9aa058dcfa..420270de19 100644
--- a/test/CodeGenOpenCL/private-array-initialization.cl
+++ b/test/CodeGenOpenCL/private-array-initialization.cl
@@ -6,11 +6,11 @@
void test() {
__private int arr[] = {1, 2, 3};
// PRIVATE0: %[[arr_i8_ptr:[0-9]+]] = bitcast [3 x i32]* %arr to i8*
-// PRIVATE0: call void @llvm.memcpy.p0i8.p2i8.i32(i8* align 4 %[[arr_i8_ptr]], i8 addrspace(2)* align 4 bitcast ([3 x i32] addrspace(2)* @test.arr to i8 addrspace(2)*), i32 12, i1 false)
+// PRIVATE0: call void @llvm.memcpy.p0i8.p2i8.i32(i8* align 4 %[[arr_i8_ptr]], i8 addrspace(2)* align 4 bitcast ([3 x i32] addrspace(2)* @__const.test.arr to i8 addrspace(2)*), i32 12, i1 false)
// PRIVATE5: %arr = alloca [3 x i32], align 4, addrspace(5)
// PRIVATE5: %0 = bitcast [3 x i32] addrspace(5)* %arr to i8 addrspace(5)*
-// PRIVATE5: call void @llvm.memcpy.p5i8.p4i8.i64(i8 addrspace(5)* align 4 %0, i8 addrspace(4)* align 4 bitcast ([3 x i32] addrspace(4)* @test.arr to i8 addrspace(4)*), i64 12, i1 false)
+// PRIVATE5: call void @llvm.memcpy.p5i8.p4i8.i64(i8 addrspace(5)* align 4 %0, i8 addrspace(4)* align 4 bitcast ([3 x i32] addrspace(4)* @__const.test.arr to i8 addrspace(4)*), i64 12, i1 false)
}
__kernel void initializer_cast_is_valid_crash() {