From 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df Mon Sep 17 00:00:00 2001
From: dim <dim@FreeBSD.org>
Date: Sun, 20 Feb 2011 13:06:31 +0000
Subject: Vendor import of clang trunk r126079:
 http://llvm.org/svn/llvm-project/cfe/trunk@126079

---
 .../specialized-static-data-mem-init.cpp           | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 test/CodeGenCXX/specialized-static-data-mem-init.cpp

(limited to 'test/CodeGenCXX/specialized-static-data-mem-init.cpp')

diff --git a/test/CodeGenCXX/specialized-static-data-mem-init.cpp b/test/CodeGenCXX/specialized-static-data-mem-init.cpp
new file mode 100644
index 0000000..8f5765b
--- /dev/null
+++ b/test/CodeGenCXX/specialized-static-data-mem-init.cpp
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// rdar: // 8562966
+// pr8409
+
+// CHECK: @_ZN1CIiE11needs_guardE = weak global
+// CHECK: @_ZGVN1CIiE11needs_guardE = weak global
+
+struct K
+{
+  K();
+  K(const K &);
+  ~K();
+  void PrintNumK();
+};
+
+template<typename T>
+struct C
+{
+  void Go() { needs_guard.PrintNumK(); }
+  static K needs_guard;
+};
+
+template<typename T> K C<T>::needs_guard;
+
+void F()
+{
+  C<int>().Go();
+}
+
-- 
cgit v1.1