[llvm] r362536 - llvm-undname: Add test coverage for demangleInitFiniStub()
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 4 11:06:28 PDT 2019
Author: nico
Date: Tue Jun 4 11:06:28 2019
New Revision: 362536
URL: http://llvm.org/viewvc/llvm-project?rev=362536&view=rev
Log:
llvm-undname: Add test coverage for demangleInitFiniStub()
Modified:
llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp
llvm/trunk/test/Demangle/invalid-manglings.test
llvm/trunk/test/Demangle/ms-operators.test
Modified: llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp?rev=362536&r1=362535&r2=362536&view=diff
==============================================================================
--- llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp (original)
+++ llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp Tue Jun 4 11:06:28 2019
@@ -465,9 +465,9 @@ SymbolNode *Demangler::demangleSpecialIn
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
Modified: llvm/trunk/test/Demangle/invalid-manglings.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Demangle/invalid-manglings.test?rev=362536&r1=362535&r2=362536&view=diff
==============================================================================
--- llvm/trunk/test/Demangle/invalid-manglings.test (original)
+++ llvm/trunk/test/Demangle/invalid-manglings.test Tue Jun 4 11:06:28 2019
@@ -90,6 +90,16 @@
; CHECK-NEXT: ??__E?Foo@@0HA@@
; CHECK-NEXT: error: Invalid mangled name
+??__E?i at C@@0HA@
+; CHECK-EMPTY:
+; CHECK-NEXT: ??__E?i at 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 at 8
; CHECK-EMPTY:
; CHECK-NEXT: ??8 at 8
Modified: llvm/trunk/test/Demangle/ms-operators.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Demangle/ms-operators.test?rev=362536&r1=362535&r2=362536&view=diff
==============================================================================
--- llvm/trunk/test/Demangle/ms-operators.test (original)
+++ llvm/trunk/test/Demangle/ms-operators.test Tue Jun 4 11:06:28 2019
@@ -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 at 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)
More information about the llvm-commits
mailing list