1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

llvm-undname: Add test coverage for demangleInitFiniStub()

llvm-svn: 362536
This commit is contained in:
Nico Weber 2019-06-04 18:06:28 +00:00
parent cd21cdef5e
commit f7ac66ab00
3 changed files with 19 additions and 2 deletions

View File

@ -465,9 +465,9 @@ SymbolNode *Demangler::demangleSpecialIntrinsic(StringView &MangledName) {
case SpecialIntrinsicKind::RttiBaseClassDescriptor:
return demangleRttiBaseClassDescriptorNode(Arena, MangledName);
case SpecialIntrinsicKind::DynamicInitializer:
return demangleInitFiniStub(MangledName, false);
return demangleInitFiniStub(MangledName, /*IsDestructor=*/false);
case SpecialIntrinsicKind::DynamicAtexitDestructor:
return demangleInitFiniStub(MangledName, true);
return demangleInitFiniStub(MangledName, /*IsDestructor=*/true);
case SpecialIntrinsicKind::Typeof:
case SpecialIntrinsicKind::UdtReturning:
// It's unclear which tools produces these manglings, so demangling

View File

@ -90,6 +90,16 @@
; CHECK-NEXT: ??__E?Foo@@0HA@@
; CHECK-NEXT: error: Invalid mangled name
??__E?i@C@@0HA@
; CHECK-EMPTY:
; CHECK-NEXT: ??__E?i@C@@0HA@
; CHECK-NEXT: error: Invalid mangled name
??__E?Foo@@YAXXZ
; CHECK-EMPTY:
; CHECK-NEXT: ??__E?Foo@@YAXXZ
; CHECK-NEXT: error: Invalid mangled name
??8@8
; CHECK-EMPTY:
; CHECK-NEXT: ??8@8

View File

@ -221,9 +221,16 @@
??_R4Base@@6B@
; CHECK: const Base::`RTTI Complete Object Locator'
; Generated for `int Foo = f(4);` at global scope.
??__EFoo@@YAXXZ
; CHECK: void __cdecl `dynamic initializer for 'Foo''(void)
; Generated for
; class C { static int i; };
; int C::i = f(5);
??__E?i@C@@0HA@@YAXXZ
; CHECK: void __cdecl `dynamic initializer for `private: static int C::i''(void)
??__FFoo@@YAXXZ
; CHECK: void __cdecl `dynamic atexit destructor for 'Foo''(void)