aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/2003-11-02-WeakLinkage.cpp')
-rw-r--r--test/CodeGenCXX/2003-11-02-WeakLinkage.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp b/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp
new file mode 100644
index 000000000000..02f9fc6e911d
--- /dev/null
+++ b/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// The template should compile to linkonce linkage, not weak linkage.
+
+// CHECK-NOT: weak
+template<class T>
+void thefunc();
+
+template<class T>
+inline void thefunc() {}
+
+void test() {
+ thefunc<int>();
+}