From 414b549e764607d9bf767a82057c10cd8f2c3be1 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Wed, 12 May 2010 05:04:20 +0000 Subject: Testcase for llvm 103572 (7898991). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103574 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../2010-05-11-alwaysinlineinstantiation.cpp | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/FrontendC++/2010-05-11-alwaysinlineinstantiation.cpp (limited to 'test/FrontendC++') diff --git a/test/FrontendC++/2010-05-11-alwaysinlineinstantiation.cpp b/test/FrontendC++/2010-05-11-alwaysinlineinstantiation.cpp new file mode 100644 index 0000000..203b542 --- /dev/null +++ b/test/FrontendC++/2010-05-11-alwaysinlineinstantiation.cpp @@ -0,0 +1,31 @@ +// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | not grep ZN12basic_stringIcEC1Ev +// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep ZN12basic_stringIcED1Ev | count 2 + +template +class basic_string +{ +public: + basic_string(); + ~basic_string(); +}; + +template +__attribute__ ((__visibility__("hidden"), __always_inline__)) inline +basic_string::basic_string() +{ +} + +template +inline +basic_string::~basic_string() +{ +} + +typedef basic_string string; + +extern template class basic_string; + +int main() +{ + string s; +} -- cgit v1.1