summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/explicit-instantiation.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-13 18:23:07 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-13 18:23:07 +0000
commit8f51a4f2d00b0abda3cde7f3828fb2e2b9beafb5 (patch)
treef094edbfc92c77e38ed8992e41961d673cc552d3 /test/CodeGenCXX/explicit-instantiation.cpp
parent961b167bcea8fe37465b2770c90bf9bf6b349470 (diff)
Give explicit template instantiations weak ODR linkage. Former
iterations of this patch gave explicit template instantiation link-once ODR linkage, which permitted the back end to eliminate unused symbols. Weak ODR linkage still requires the symbols to be generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/explicit-instantiation.cpp')
-rw-r--r--test/CodeGenCXX/explicit-instantiation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/CodeGenCXX/explicit-instantiation.cpp b/test/CodeGenCXX/explicit-instantiation.cpp
index ab9174e8f4..24d1a67392 100644
--- a/test/CodeGenCXX/explicit-instantiation.cpp
+++ b/test/CodeGenCXX/explicit-instantiation.cpp
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -triple i686-pc-linux-gnu -o %t %s
-// RUN: grep "define i32 @_ZNK4plusIillEclERKiRKl" %t | count 1
+// RUN: %clang_cc1 -emit-llvm -triple i686-pc-linux-gnu -o - %s | FileCheck %s
template<typename T, typename U, typename Result>
struct plus {
@@ -11,4 +10,5 @@ Result plus<T, U, Result>::operator()(const T& t, const U& u) const {
return t + u;
}
+// CHECK: define weak_odr i32 @_ZNK4plusIillEclERKiRKl
template struct plus<int, long, long>;