blob: 07e28bce2f8fe494050d716e4f75a3373f7a19ff [file] [log] [blame]
Austin Schuh906616c2019-01-21 20:25:11 -08001# Test caces for demangle_unittest. Each line consists of a
2# tab-separated pair of mangled and demangled symbol names.
3
4# Constructors and destructors.
5_ZN3FooC1Ev Foo::Foo()
6_ZN3FooD1Ev Foo::~Foo()
7_ZNSoD0Ev std::ostream::~ostream()
8
9# G++ extensions.
10_ZTCN10LogMessage9LogStreamE0_So LogMessage::LogStream
11_ZTv0_n12_N10LogMessage9LogStreamD0Ev LogMessage::LogStream::~LogStream()
12_ZThn4_N7icu_3_410UnicodeSetD0Ev icu_3_4::UnicodeSet::~UnicodeSet()
13
14# A bug in g++'s C++ ABI version 2 (-fabi-version=2).
15_ZN7NSSInfoI5groupjjXadL_Z10getgrgid_rEELZ19nss_getgrgid_r_nameEEC1Ei NSSInfo<>::NSSInfo()
16
17# C linkage symbol names. Should keep them untouched.
18main main
19Demangle Demangle
20_ZERO _ZERO
21
22# Cast operator.
23_Zcviv operator int()
24_ZN3foocviEv foo::operator int()
25
26# Versioned symbols.
27_Z3Foo@GLIBCXX_3.4 Foo@GLIBCXX_3.4
28_Z3Foo@@GLIBCXX_3.4 Foo@@GLIBCXX_3.4
29
30# Abbreviations.
31_ZNSaE std::allocator
32_ZNSbE std::basic_string
33_ZNSdE std::iostream
34_ZNSiE std::istream
35_ZNSoE std::ostream
36_ZNSsE std::string
37
38# Substitutions. We just replace them with ?.
39_ZN3fooS_E foo::?
40_ZN3foo3barS0_E foo::bar::?
41_ZNcvT_IiEEv operator ?<>()
42
43# "<< <" case.
44_ZlsI3fooE operator<< <>
45
46# ABI tags.
47_Z1AB3barB3foo A
48_ZN3fooL3barB5cxx11E foo::bar
49
50# Random things we found interesting.
51_ZN3FooISt6vectorISsSaISsEEEclEv Foo<>::operator()()
52_ZTI9Callback1IiE Callback1<>
53_ZN7icu_3_47UMemorynwEj icu_3_4::UMemory::operator new()
54_ZNSt6vectorIbE9push_backE std::vector<>::push_back
55_ZNSt6vectorIbSaIbEE9push_backEb std::vector<>::push_back()
56_ZlsRSoRK15PRIVATE_Counter operator<<()
57_ZSt6fill_nIPPN9__gnu_cxx15_Hashtable_nodeISt4pairIKPKcjEEEjS8_ET_SA_T0_RKT1_ std::fill_n<>()
58_ZZ3FoovE3Bar Foo()::Bar
59_ZGVZ7UpTimervE8up_timer UpTimer()::up_timer
60
61# Test cases from gcc-4.1.0/libstdc++-v3/testsuite/demangle.
62# Collected by:
63# % grep verify_demangle **/*.cc | perl -nle 'print $1 if /"(_Z.*?)"/' |
64# sort | uniq
65#
66# Note that the following symbols are invalid.
67# That's why they are not demangled.
68# - _ZNZN1N1fEiE1X1gE
69# - _ZNZN1N1fEiE1X1gEv
70# - _Z1xINiEE
71_Z1fA37_iPS_ f()
72_Z1fAszL_ZZNK1N1A1fEvE3foo_0E_i f()
73_Z1fI1APS0_PKS0_EvT_T0_T1_PA4_S3_M1CS8_ f<>()
74_Z1fI1XENT_1tES2_ f<>()
75_Z1fI1XEvPVN1AIT_E1TE f<>()
76_Z1fILi1ELc120EEv1AIXplT_cviLd4028ae147ae147aeEEE f<>()
77_Z1fILi1ELc120EEv1AIXplT_cviLf3f800000EEE f<>()
78_Z1fILi5E1AEvN1CIXqugtT_Li0ELi1ELi2EEE1qE f<>()
79_Z1fILi5E1AEvN1CIXstN1T1tEEXszsrS2_1tEE1qE f<>()
80_Z1fILi5EEvN1AIXcvimlT_Li22EEE1qE f<>()
81_Z1fIiEvi f<>()
82_Z1fKPFiiE f()
83_Z1fM1AFivEPS0_ f()
84_Z1fM1AKFivE f()
85_Z1fM1AKFvvE f()
86_Z1fPFPA1_ivE f()
87_Z1fPFYPFiiEiE f()
88_Z1fPFvvEM1SFvvE f()
89_Z1fPKM1AFivE f()
90_Z1fi f()
91_Z1fv f()
92_Z1jM1AFivEPS1_ j()
93_Z1rM1GFivEMS_KFivES_M1HFivES1_4whatIKS_E5what2IS8_ES3_ r()
94_Z1sPA37_iPS0_ s()
95_Z1xINiEE _Z1xINiEE
96_Z3absILi11EEvv abs<>()
97_Z3foo3bar foo()
98_Z3foo5Hello5WorldS0_S_ foo()
99_Z3fooA30_A_i foo()
100_Z3fooIA6_KiEvA9_KT_rVPrS4_ foo<>()
101_Z3fooILi2EEvRAplT_Li1E_i foo<>()
102_Z3fooIiFvdEiEvv foo<>()
103_Z3fooPM2ABi foo()
104_Z3fooc foo()
105_Z3fooiPiPS_PS0_PS1_PS2_PS3_PS4_PS5_PS6_PS7_PS8_PS9_PSA_PSB_PSC_ foo()
106_Z3kooPA28_A30_i koo()
107_Z4makeI7FactoryiET_IT0_Ev make<>()
108_Z5firstI3DuoEvS0_ first<>()
109_Z5firstI3DuoEvT_ first<>()
110_Z9hairyfuncM1YKFPVPFrPA2_PM1XKFKPA3_ilEPcEiE hairyfunc()
111_ZGVN5libcw24_GLOBAL__N_cbll.cc0ZhUKa23compiler_bug_workaroundISt6vectorINS_13omanip_id_tctINS_5debug32memblk_types_manipulator_data_ctEEESaIS6_EEE3idsE libcw::(anonymous namespace)::compiler_bug_workaround<>::ids
112_ZN12libcw_app_ct10add_optionIS_EEvMT_FvPKcES3_cS3_S3_ libcw_app_ct::add_option<>()
113_ZN1AIfEcvT_IiEEv A<>::operator ?<>()
114_ZN1N1TIiiE2mfES0_IddE N::T<>::mf()
115_ZN1N1fE N::f
116_ZN1f1fE f::f
117_ZN3FooIA4_iE3barE Foo<>::bar
118_ZN5Arena5levelE Arena::level
119_ZN5StackIiiE5levelE Stack<>::level
120_ZN5libcw5debug13cwprint_usingINS_9_private_12GlobalObjectEEENS0_17cwprint_using_tctIT_EERKS5_MS5_KFvRSt7ostreamE libcw::debug::cwprint_using<>()
121_ZN6System5Sound4beepEv System::Sound::beep()
122_ZNKSt14priority_queueIP27timer_event_request_base_ctSt5dequeIS1_SaIS1_EE13timer_greaterE3topEv std::priority_queue<>::top()
123_ZNKSt15_Deque_iteratorIP15memory_block_stRKS1_PS2_EeqERKS5_ std::_Deque_iterator<>::operator==()
124_ZNKSt17__normal_iteratorIPK6optionSt6vectorIS0_SaIS0_EEEmiERKS6_ std::__normal_iterator<>::operator-()
125_ZNSbIcSt11char_traitsIcEN5libcw5debug27no_alloc_checking_allocatorEE12_S_constructIPcEES6_T_S7_RKS3_ std::basic_string<>::_S_construct<>()
126_ZNSt13_Alloc_traitsISbIcSt18string_char_traitsIcEN5libcw5debug9_private_17allocator_adaptorIcSt24__default_alloc_templateILb0ELi327664EELb1EEEENS5_IS9_S7_Lb1EEEE15_S_instancelessE std::_Alloc_traits<>::_S_instanceless
127_ZNSt3_In4wardE std::_In::ward
128_ZNZN1N1fEiE1X1gE _ZNZN1N1fEiE1X1gE
129_ZNZN1N1fEiE1X1gEv _ZNZN1N1fEiE1X1gEv
130_ZSt1BISt1DIP1ARKS2_PS3_ES0_IS2_RS2_PS2_ES2_ET0_T_SB_SA_PT1_ std::B<>()
131_ZSt5state std::state
132_ZTI7a_class a_class
133_ZZN1N1fEiE1p N::f()::p
134_ZZN1N1fEiEs N::f()
135_ZlsRK1XS1_ operator<<()
136_ZlsRKU3fooU4bart1XS0_ operator<<()
137_ZlsRKU3fooU4bart1XS2_ operator<<()
138_ZlsRSoRKSs operator<<()
139_ZngILi42EEvN1AIXplT_Li2EEE1TE operator-<>()
140_ZplR1XS0_ operator+()
141_Zrm1XS_ operator%()
142
143# Template argument packs can start with I or J.
144_Z3addIIiEEvDpT_ add<>()
145_Z3addIJiEEvDpT_ add<>()