diff options
author | Charles Davis <cdavis@mines.edu> | 2010-06-26 03:50:05 +0000 |
---|---|---|
committer | Charles Davis <cdavis@mines.edu> | 2010-06-26 03:50:05 +0000 |
commit | 3a0d41d29192ff42870310e33800939f4e34bb55 (patch) | |
tree | bf701b44d330e87b53559292ab88e9d4940665bd /test | |
parent | 01982463f9b979c2032e4960695d7e3d5d762e31 (diff) |
Mangle pointer and (lvalue) reference types in the Microsoft C++ Mangler.
Also, fix mangling of throw specs. Turns out MSVC totally ignores throw
specs when mangling names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGenCXX/mangle-ms.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/CodeGenCXX/mangle-ms.cpp b/test/CodeGenCXX/mangle-ms.cpp index a528054d8d..d0bd4a967d 100644 --- a/test/CodeGenCXX/mangle-ms.cpp +++ b/test/CodeGenCXX/mangle-ms.cpp @@ -7,6 +7,7 @@ // CHECK: @"\01?e@foo@@1JC" // CHECK: @"\01?f@foo@@2DD" // CHECK: @"\01?g@bar@@2HA" +// CHECK: @"\01?h@@3QAHA" int a; @@ -50,18 +51,23 @@ const volatile char foo::f = 'C'; int bar::g; +extern int * const h = &a; + // Static functions are mangled, too. // Also make sure calling conventions, arglists, and throw specs work. static void __stdcall alpha(float a, double b) throw() {} bool __fastcall beta(long long a, wchar_t b) throw(signed char, unsigned char) { -// CHECK: @"\01?beta@@YI_N_J_W@CE@" +// CHECK: @"\01?beta@@YI_N_J_W@Z" alpha(0.f, 0.0); return false; } -// CHECK: @"\01?alpha@@YGXMN@@" +// CHECK: @"\01?alpha@@YGXMN@Z" // Make sure tag-type mangling works. void gamma(class foo, struct bar, union baz, enum quux) {} // CHECK: @"\01?gamma@@YAXVfoo@@Ubar@@Tbaz@@W4quux@@@Z" +// Make sure pointer/reference-type mangling works. +void delta(int * const a, const long &) {} +// CHECK: @"\01?delta@@YAXQAHABJ@Z" |