Eric Christopher | 41f001f | 2011-08-16 21:41:33 +0000 | [diff] [blame^] | 1 | // RUN: %clang -fexceptions %s -S -emit-llvm -o - | FileCheck %s |
| 2 | // PR4262 |
| 3 | |
| 4 | // CHECK-NOT: _ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag |
| 5 | |
| 6 | // The "basic_string" extern template instantiation declaration is supposed to |
| 7 | // suppress the implicit instantiation of non-inline member functions. Make sure |
| 8 | // that we suppress the implicit instantiation of non-inline member functions |
| 9 | // defined out-of-line. That we aren't instantiating the basic_string |
| 10 | // constructor when we shouldn't be. Such an instantiation forces the implicit |
| 11 | // instantiation of _S_construct<const char*>. Since _S_construct is a member |
| 12 | // template, it's instantiation is *not* suppressed (despite being in |
| 13 | // basic_string<char>), so we would emit it as a weak definition. |
| 14 | |
| 15 | #include <stdexcept> |
| 16 | |
| 17 | void dummysymbol() { |
| 18 | throw(std::runtime_error("string")); |
| 19 | } |