Clang Project

clang_source_code/test/CodeGenCXX/alias-available-externally.cpp
1// RUN: %clang_cc1 -O1 -std=c++11 -emit-llvm -triple %itanium_abi_triple -disable-llvm-passes -o - %s | FileCheck %s
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
6template <class CharT>
7struct String {
8  String() {}
9  ~String();
10};
11
12template <class CharT>
13inline __attribute__((visibility("hidden"), always_inline))
14String<CharT>::~String() {}
15
16extern template struct String<char>;
17
18struct Foo : public String<char> { Foo() { String<char> s; } };
19
20Foo f;
21