summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp')
-rw-r--r--clang/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp b/clang/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp
new file mode 100644
index 0000000..02f9fc6
--- /dev/null
+++ b/clang/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>();
+}