Aditya Kumar | b906230 | 2016-10-03 02:36:33 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -O1 -std=c++11 -emit-llvm -triple %itanium_abi_triple -disable-llvm-passes -o - %s | FileCheck %s |
Aditya Kumar | e84372b | 2016-10-02 03:06:36 +0000 | [diff] [blame] | 2 | // Clang should not generate alias to available_externally definitions. |
| 3 | // Check that the destructor of Foo is defined. |
| 4 | // The destructors have different return type for different targets. |
| 5 | // CHECK: define linkonce_odr {{.*}} @_ZN3FooD2Ev |
| 6 | template <class CharT> |
| 7 | struct String { |
| 8 | String() {} |
| 9 | ~String(); |
| 10 | }; |
| 11 | |
| 12 | template <class CharT> |
| 13 | inline __attribute__((visibility("hidden"), always_inline)) |
| 14 | String<CharT>::~String() {} |
| 15 | |
| 16 | extern template struct String<char>; |
| 17 | |
| 18 | struct Foo : public String<char> { Foo() { String<char> s; } }; |
| 19 | |
| 20 | Foo f; |