diff options
| author | John McCall <rjmccall@apple.com> | 2010-10-30 09:18:49 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-10-30 09:18:49 +0000 |
| commit | 36cd5cc1507cb06b281ea7712913ed90899215b1 (patch) | |
| tree | 468da68501bfd3066c4ebd30ded13f3cc9645579 /clang/test | |
| parent | 7d11382b8cf91739d3e65121823aee3112e8c497 (diff) | |
| download | bcm5719-llvm-36cd5cc1507cb06b281ea7712913ed90899215b1.tar.gz bcm5719-llvm-36cd5cc1507cb06b281ea7712913ed90899215b1.zip | |
GCC faithfully calculates visibility for variables independently of
whether it's a declaration or not, then ignores that information for
declarations unless it was explicitly given. It's not totally clear
how that should be mapped into a sane system, but make an effort.
llvm-svn: 117780
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/visibility.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/visibility.cpp b/clang/test/CodeGenCXX/visibility.cpp index a55544573de..2272d1fa5e4 100644 --- a/clang/test/CodeGenCXX/visibility.cpp +++ b/clang/test/CodeGenCXX/visibility.cpp @@ -20,6 +20,8 @@ // CHECK-HIDDEN: @_ZN6Test131C1aE = global // CHECK: @_ZN6Test143varE = external global // CHECK-HIDDEN: @_ZN6Test143varE = external global +// CHECK: @_ZN6Test154TempINS_1AEE5Inner6bufferE = external global [0 x i8] +// CHECK-HIDDEN: @_ZN6Test154TempINS_1AEE5Inner6bufferE = external global [0 x i8] // CHECK: @_ZTVN5Test63fooE = weak_odr hidden constant namespace Test1 { @@ -218,3 +220,17 @@ namespace Test14 { struct A *test() { return var; } } + +// rdar://problem/8613093 +namespace Test15 { + struct A {}; + template <class T> struct Temp { + struct Inner { + static char buffer[0]; + }; + }; + + char *test() { + return Temp<A>::Inner::buffer; + } +} |

