Nico Weber | c956b6e | 2010-09-27 21:02:09 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fvisibility hidden -emit-llvm -o - %s | FileCheck %s |
| 2 | |
| 3 | // Verify that symbols are hidden. |
John McCall | 99ace16 | 2011-04-12 01:46:54 +0000 | [diff] [blame] | 4 | // CHECK: @_ZN1CIiE5Inner6Inner26StaticE = weak_odr hidden global |
Nico Weber | c956b6e | 2010-09-27 21:02:09 +0000 | [diff] [blame] | 5 | // CHECK: define weak_odr hidden void @_ZN1CIiE5Inner1fEv |
| 6 | // CHECK: define weak_odr hidden void @_ZN1CIiE5Inner6Inner21gEv |
| 7 | |
| 8 | template<typename T> |
| 9 | struct C { |
| 10 | struct Inner { |
| 11 | void f(); |
| 12 | struct Inner2 { |
| 13 | void g(); |
| 14 | static int Static; |
| 15 | }; |
| 16 | }; |
| 17 | }; |
| 18 | |
| 19 | template<typename T> void C<T>::Inner::f() { } |
| 20 | template<typename T> void C<T>::Inner::Inner2::g() { } |
| 21 | template<typename T> int C<T>::Inner::Inner2::Static; |
| 22 | |
| 23 | extern template struct C<int>; |
| 24 | template struct C<int>; |