Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s |
Anders Carlsson | 7b06f6c | 2009-12-10 03:14:39 +0000 | [diff] [blame] | 2 | |
| 3 | // CHECK: @"_ZZ11+[A shared]E1a" = internal global |
| 4 | // CHECK: @"_ZZ11-[A(Foo) f]E1a" = internal global |
| 5 | |
| 6 | @interface A |
| 7 | @end |
| 8 | |
| 9 | @implementation A |
| 10 | |
| 11 | + (A *)shared { |
| 12 | static A* a; |
| 13 | |
| 14 | return a; |
| 15 | } |
| 16 | |
| 17 | @end |
| 18 | |
| 19 | @interface A(Foo) |
| 20 | @end |
| 21 | |
| 22 | @implementation A(Foo) |
| 23 | - (int)f { |
| 24 | // FIXME: Add a member function to s and make sure that it's mangled correctly. |
| 25 | struct s { |
| 26 | }; |
| 27 | |
| 28 | static s a; |
| 29 | |
| 30 | return 0; |
| 31 | } |
| 32 | @end |