diff options
author | JF Bastien <jfbastien@apple.com> | 2018-11-15 00:19:18 +0000 |
---|---|---|
committer | JF Bastien <jfbastien@apple.com> | 2018-11-15 00:19:18 +0000 |
commit | 3a881e6bbcb06a7e753f88249a29d427ecce64c5 (patch) | |
tree | 0017ed6e8adc60a88f22a6f5ef9a71d1ceaeac79 /clang/test/CodeGenCXX/cxx2a-init-statement.cpp | |
parent | 22bdb3310809d8d2055afc262a0aa81c06100447 (diff) | |
download | bcm5719-llvm-3a881e6bbcb06a7e753f88249a29d427ecce64c5.tar.gz bcm5719-llvm-3a881e6bbcb06a7e753f88249a29d427ecce64c5.zip |
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
llvm-svn: 346915
Diffstat (limited to 'clang/test/CodeGenCXX/cxx2a-init-statement.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/cxx2a-init-statement.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/cxx2a-init-statement.cpp b/clang/test/CodeGenCXX/cxx2a-init-statement.cpp index eb48d4a1782..2d45c855445 100644 --- a/clang/test/CodeGenCXX/cxx2a-init-statement.cpp +++ b/clang/test/CodeGenCXX/cxx2a-init-statement.cpp @@ -1,10 +1,10 @@ // RUN: %clang_cc1 -std=c++2a -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s -w | FileCheck %s -// CHECK: @_ZZ1fvE3arr = private unnamed_addr constant [3 x i32] [i32 1, i32 2, i32 3], align 4 +// CHECK: @__const._Z1fv.arr = private unnamed_addr constant [3 x i32] [i32 1, i32 2, i32 3], align 4 void f() { // CHECK: %[[ARR:.*]] = alloca [3 x i32], align 4 - // CHECK: call void @llvm.memcpy{{.*}}({{.*}} @_ZZ1fvE3arr + // CHECK: call void @llvm.memcpy{{.*}}({{.*}} @__const._Z1fv.arr for (int arr[3] = {1, 2, 3}; int a : arr) ; } |