summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/cxx1y-variable-template.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-04-28 22:17:59 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-04-28 22:17:59 +0000
commit27d69dbbd073b5a4973d7089dcb37f764a76ebb9 (patch)
treed2a7bd670c8adaedce38c20ed88e33da5f18d9ee /clang/test/CodeGenCXX/cxx1y-variable-template.cpp
parent923cecab5c9361720e81bb098627743e83d21576 (diff)
downloadbcm5719-llvm-27d69dbbd073b5a4973d7089dcb37f764a76ebb9.tar.gz
bcm5719-llvm-27d69dbbd073b5a4973d7089dcb37f764a76ebb9.zip
CodeGen: Fix linkage of reference temporaries
Summary: A reference temporary should inherit the linkage of the variable it initializes. Otherwise, we may hit cases where a reference temporary wouldn't have the same value in all translation units. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3515 llvm-svn: 207451
Diffstat (limited to 'clang/test/CodeGenCXX/cxx1y-variable-template.cpp')
-rw-r--r--clang/test/CodeGenCXX/cxx1y-variable-template.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/cxx1y-variable-template.cpp b/clang/test/CodeGenCXX/cxx1y-variable-template.cpp
index d1e70603e28..cd73817d850 100644
--- a/clang/test/CodeGenCXX/cxx1y-variable-template.cpp
+++ b/clang/test/CodeGenCXX/cxx1y-variable-template.cpp
@@ -18,7 +18,7 @@ int init_arr();
template<typename T> template<typename U> template<typename V> int Outer<T>::Inner<U>::arr[sizeof(T) + sizeof(U) + sizeof(V)] = { init_arr() };
int *p = Outer<char[100]>::Inner<char[20]>::arr<char[3]>;
-// CHECK: @_ZN5OuterIA100_cE5InnerIA20_cE3arrIA3_cEE = weak_odr global [123 x i32] zeroinitializer
-// CHECK: @_ZGVN5OuterIA100_cE5InnerIA20_cE3arrIA3_cEE = weak_odr global
+// CHECK: @_ZN5OuterIA100_cE5InnerIA20_cE3arrIA3_cEE = linkonce_odr global [123 x i32] zeroinitializer
+// CHECK: @_ZGVN5OuterIA100_cE5InnerIA20_cE3arrIA3_cEE = linkonce_odr global
// CHECK: call {{.*}}@_Z8init_arrv
OpenPOWER on IntegriCloud