diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2010-07-18 20:49:59 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2010-07-18 20:49:59 +0000 |
commit | c00cb6409307846a9bbcd86d307a1a91aab659d0 (patch) | |
tree | dc5a74e6f57ec8bb4013de289ea699724d8a99ab /test/CodeGenCXX/mangle.cpp | |
parent | ea9799c7480197d83f93697f7b4ad98e649541b9 (diff) |
Fix mangling for static member variables of classes inside an extern "C"
linkage specification. Not sure if this is the ideal fix, but I'm reasonably
sure it's correct vs. gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp index 814a7592fa..37af79b0f9 100644 --- a/test/CodeGenCXX/mangle.cpp +++ b/test/CodeGenCXX/mangle.cpp @@ -507,3 +507,14 @@ namespace test13 { // CHECK: define weak_odr void @_ZN6test133fooINS_1BEEEvRKNS_1AIT_EE( template void foo(const A<B> &a); } + +namespace test14 { + extern "C" { + struct S { + static int a(), x; + }; + // CHECK: define i32 @_ZN6test141S1aEv + // CHECK: load i32* @_ZN6test141S1xE + int S::a() { return S::x; } + } +} |