summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-08-20 19:15:35 +0000
committerZachary Turner <zturner@google.com>2018-08-20 19:15:35 +0000
commit66555a7bed88aca313f194e57a4c8ebc547ef268 (patch)
treefaa3941641c2e27d359438974a7686ffc20f15ef /llvm/test
parent4876977085fef6df32b491896c2e3df3dc6d838b (diff)
downloadbcm5719-llvm-66555a7bed88aca313f194e57a4c8ebc547ef268.tar.gz
bcm5719-llvm-66555a7bed88aca313f194e57a4c8ebc547ef268.zip
[MS Demangler] Demangle member pointer template parameters.
llvm-svn: 340199
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Demangle/ms-templates-memptrs-2.test31
-rw-r--r--llvm/test/Demangle/ms-templates-memptrs.test95
2 files changed, 126 insertions, 0 deletions
diff --git a/llvm/test/Demangle/ms-templates-memptrs-2.test b/llvm/test/Demangle/ms-templates-memptrs-2.test
new file mode 100644
index 00000000000..d06ea0399f2
--- /dev/null
+++ b/llvm/test/Demangle/ms-templates-memptrs-2.test
@@ -0,0 +1,31 @@
+; RUN: llvm-undname < %s | FileCheck %s
+
+; CHECK-NOT: Invalid mangled name
+
+
+?m@@3U?$J@UM@@$0A@@@A
+; CHECK: struct J<struct M, 0> m
+
+?m2@@3U?$K@UM@@$0?0@@A
+; CHECK: struct K<struct M, -1> m2
+
+?n@@3U?$J@UN@@$HA@@@A
+; CHECK: struct J<struct N, nullptr> n
+
+?n2@@3U?$K@UN@@$0?0@@A
+; CHECK: struct K<struct N, -1> n2
+
+?o@@3U?$J@UO@@$IA@A@@@A
+; CHECK: struct J<struct O, nullptr> o
+
+?o2@@3U?$K@UO@@$FA@?0@@A
+; CHECK: struct K<struct O, {0, -1}> o2
+
+?p@@3U?$J@UP@@$JA@A@?0@@A
+; CHECK: struct J<struct P, nullptr> p
+
+?p2@@3U?$K@UP@@$GA@A@?0@@A
+; CHECK: struct K<struct P, {0, 0, -1}> p2
+
+??0?$ClassTemplate@$J??_9MostGeneral@@$BA@AEA@M@3@@QAE@XZ
+; CHECK: __thiscall ClassTemplate<{[thunk]: __thiscall MostGeneral::`vcall'{0, {flat}}, 0, 12, 4}>::ClassTemplate<{[thunk]: __thiscall MostGeneral::`vcall'{0, {flat}}, 0, 12, 4}>(void) \ No newline at end of file
diff --git a/llvm/test/Demangle/ms-templates-memptrs.test b/llvm/test/Demangle/ms-templates-memptrs.test
new file mode 100644
index 00000000000..3647a898871
--- /dev/null
+++ b/llvm/test/Demangle/ms-templates-memptrs.test
@@ -0,0 +1,95 @@
+; RUN: llvm-undname < %s | FileCheck %s
+
+; CHECK-NOT: Invalid mangled name
+
+; There's a back-referencing problem here
+??$CallMethod@UC@NegativeNVOffset@@$I??_912@$BA@AEPPPPPPPM@A@@@YAXAAUC@NegativeNVOffset@@@Z
+; FIXME: void __cdecl CallMethod<struct NegativeNVOffset::C, {[thunk]: __thiscall NegativeNVOffset::C::`vcall'{0, {flat}}, 4294967292, 0}>(struct NegativeNVOffset::C &)
+
+??$CallMethod@UM@@$0A@@@YAXAAUM@@@Z
+; CHECK: void __cdecl CallMethod<struct M, 0>(struct M &)
+
+??$CallMethod@UM@@$H??_91@$BA@AEA@@@YAXAAUM@@@Z
+; FIXME: void __cdecl CallMethod<struct M, {[thunk]: __thiscall M::`vcall'{0, {flat}}', 0}>(struct M &)
+
+??$CallMethod@UM@@$H?f@1@QAEXXZA@@@YAXAAUM@@@Z
+; FIXME: void __cdecl CallMethod<struct M, {void __thiscall M::f(void), 0}>(struct M &)
+
+??$CallMethod@UO@@$H??_91@$BA@AE3@@YAXAAUO@@@Z
+; FIXME: void __cdecl CallMethod<struct O, {[thunk]: __thiscall O::`vcall'{0, {flat}}, 4}>(struct O &)
+
+??$CallMethod@US@@$0A@@@YAXAAUS@@@Z
+; CHECK: void __cdecl CallMethod<struct S, 0>(struct S &)
+
+??$CallMethod@US@@$1??_91@$BA@AE@@YAXAAUS@@@Z
+; CHECK: void __cdecl CallMethod<struct S, &[thunk]: __thiscall S::`vcall'{0, {flat}}>(struct S &)
+
+??$CallMethod@US@@$1?f@1@QAEXXZ@@YAXAAUS@@@Z
+; CHECK: void __cdecl CallMethod<struct S, &void __thiscall S::f(void)>(struct S &)
+
+??$CallMethod@UU@@$0A@@@YAXAAUU@@@Z
+; CHECK: void __cdecl CallMethod<struct U, 0>(struct U &)
+
+??$CallMethod@UU@@$J??_91@$BA@AEA@A@A@@@YAXAAUU@@@Z
+; CHECK: void __cdecl CallMethod<struct U, {[thunk]: __thiscall U::`vcall'{0, {flat}}, 0, 0, 0}>(struct U &)
+
+??$CallMethod@UU@@$J?f@1@QAEXXZA@A@A@@@YAXAAUU@@@Z
+; CHECK: void __cdecl CallMethod<struct U, {void __thiscall U::f(void), 0, 0, 0}>(struct U &)
+
+??$CallMethod@UV@@$0A@@@YAXAAUV@@@Z
+; CHECK: void __cdecl CallMethod<struct V, 0>(struct V &)
+
+??$CallMethod@UV@@$I??_91@$BA@AEA@A@@@YAXAAUV@@@Z
+; CHECK: void __cdecl CallMethod<struct V, {[thunk]: __thiscall V::`vcall'{0, {flat}}, 0, 0}>(struct V &)
+
+??$CallMethod@UV@@$I?f@1@QAEXXZA@A@@@YAXAAUV@@@Z
+; CHECK: void __cdecl CallMethod<struct V, {void __thiscall V::f(void), 0, 0}>(struct V &)
+
+??$ReadField@UA@@$0?0@@YAHAAUA@@@Z
+; CHECK: int __cdecl ReadField<struct A, -1>(struct A &)
+
+??$ReadField@UA@@$0A@@@YAHAAUA@@@Z
+; CHECK: int __cdecl ReadField<struct A, 0>(struct A &)
+
+??$ReadField@UI@@$03@@YAHAAUI@@@Z
+; CHECK: int __cdecl ReadField<struct I, 4>(struct I &)
+
+??$ReadField@UI@@$0A@@@YAHAAUI@@@Z
+; CHECK: int __cdecl ReadField<struct I, 0>(struct I &)
+
+??$ReadField@UM@@$0A@@@YAHAAUM@@@Z
+; CHECK: int __cdecl ReadField<struct M, 0>(struct M &)
+
+??$ReadField@UM@@$0BA@@@YAHAAUM@@@Z
+; CHECK: int __cdecl ReadField<struct M, 16>(struct M &)
+
+??$ReadField@UM@@$0M@@@YAHAAUM@@@Z
+; CHECK: int __cdecl ReadField<struct M, 12>(struct M &)
+
+??$ReadField@US@@$03@@YAHAAUS@@@Z
+; CHECK: int __cdecl ReadField<struct S, 4>(struct S &)
+
+??$ReadField@US@@$07@@YAHAAUS@@@Z
+; CHECK: int __cdecl ReadField<struct S, 8>(struct S &)
+
+??$ReadField@US@@$0A@@@YAHAAUS@@@Z
+; CHECK: int __cdecl ReadField<struct S, 0>(struct S &)
+
+??$ReadField@UU@@$0A@@@YAHAAUU@@@Z
+; CHECK: int __cdecl ReadField<struct U, 0>(struct U &)
+
+??$ReadField@UU@@$G3A@A@@@YAHAAUU@@@Z
+; CHECK: int __cdecl ReadField<struct U, {4, 0, 0}>(struct U &)
+
+??$ReadField@UU@@$G7A@A@@@YAHAAUU@@@Z
+; CHECK: int __cdecl ReadField<struct U, {8, 0, 0}>(struct U &)
+
+??$ReadField@UV@@$0A@@@YAHAAUV@@@Z
+; CHECK: int __cdecl ReadField<struct V, 0>(struct V &)
+
+??$ReadField@UV@@$F7A@@@YAHAAUV@@@Z
+; CHECK: int __cdecl ReadField<struct V, {8, 0}>(struct V &)
+
+??$ReadField@UV@@$FM@A@@@YAHAAUV@@@Z
+; CHECK: int __cdecl ReadField<struct V, {12, 0}>(struct V &)
+
OpenPOWER on IntegriCloud