summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/static-init-3.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-04-12 01:46:54 +0000
committerJohn McCall <rjmccall@apple.com>2011-04-12 01:46:54 +0000
commita97f32986913c07cac9c49b0b6b755b7190812b1 (patch)
treeb186fabf5c2070c3ece88e6c820f55895b510e40 /clang/test/CodeGenCXX/static-init-3.cpp
parentb4744a3f4d9bffebc671201b6c133f7464fb1c8e (diff)
downloadbcm5719-llvm-a97f32986913c07cac9c49b0b6b755b7190812b1.tar.gz
bcm5719-llvm-a97f32986913c07cac9c49b0b6b755b7190812b1.zip
Template static data members can have weak_odr linkage, not just
weak linkage. Also, fix a problem where global weak variables with non-trivial initializers were getting guard variables, or at least were checking for them and then crashing. llvm-svn: 129342
Diffstat (limited to 'clang/test/CodeGenCXX/static-init-3.cpp')
-rw-r--r--clang/test/CodeGenCXX/static-init-3.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/static-init-3.cpp b/clang/test/CodeGenCXX/static-init-3.cpp
index 5bf76a61708..bd717caaa17 100644
--- a/clang/test/CodeGenCXX/static-init-3.cpp
+++ b/clang/test/CodeGenCXX/static-init-3.cpp
@@ -16,8 +16,8 @@ struct X1
}
};
-// CHECK: @_ZN2X1I2X2I1BEE8instanceE = weak global %struct.X0* null, align 8
-// CHECJ: @_ZN2X1I2X2I1AEE8instanceE = weak global %struct.X0* null, align 8
+// CHECK: @_ZN2X1I2X2I1BEE8instanceE = weak_odr global %struct.X0* null, align 8
+// CHECJ: @_ZN2X1I2X2I1AEE8instanceE = weak_odr global %struct.X0* null, align 8
template<class T> T & X1<T>::instance = X1<T>::get();
class A { };
OpenPOWER on IntegriCloud