From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- .../2010-05-11-alwaysinlineinstantiation.cpp | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 clang/test/CodeGenCXX/2010-05-11-alwaysinlineinstantiation.cpp (limited to 'clang/test/CodeGenCXX/2010-05-11-alwaysinlineinstantiation.cpp') diff --git a/clang/test/CodeGenCXX/2010-05-11-alwaysinlineinstantiation.cpp b/clang/test/CodeGenCXX/2010-05-11-alwaysinlineinstantiation.cpp new file mode 100644 index 0000000..fe0740b --- /dev/null +++ b/clang/test/CodeGenCXX/2010-05-11-alwaysinlineinstantiation.cpp @@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s + +// CHECK-NOT: ZN12basic_stringIcEC1Ev +// CHECK: ZN12basic_stringIcED1Ev +// CHECK: ZN12basic_stringIcED1Ev +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.2.3