1 RUN: llvm-cxxfilt -n < %s | FileCheck --match-full-lines %s
7 _RNvCshGpAVYOtgW1_5hello4rust
19 CHECK: crate::{closure#0}
22 CHECK: crate::{closure#1}
25 CHECK: crate::{closure:foo#0}
28 CHECK: crate::{closure:foo#1}
33 CHECK: crate::{shim:reify#0}
36 ; Unrecognized special namespace
38 CHECK: crate::{Z:ident#10}
62 ; Generic type arguments
67 CHECK: generic::<_, _>
70 CHECK: generic::<_, _, _>
73 ; Generic const arguments
75 CHECK: generic_const::<_>
76 _RIC13generic_constKpE
78 ; Generic lifetime arguments
80 CHECK: generic_lifetime::<'_>
81 _RIC16generic_lifetimeL_E
83 ; Invalid lifetime index.
85 CHECK: _RIC16generic_lifetimeL0_E
86 _RIC16generic_lifetimeL0_E
111 CHECK: basic::<isize>
114 CHECK: basic::<usize>
153 ; Named types. Test possible paths productions.
161 CHECK: named::<<_ as Name>>
162 _RIC5namedXC5cratepC4NameE
164 CHECK: named::<<_ as Name>>
167 CHECK: named::<name::Name>
168 _RIC5namedNvC4name4NameE
170 CHECK: named::<Name<>>
175 CHECK: types::<[u8; 0]>
187 CHECK: types::<(_, _)>
190 CHECK: types::<(_, _, _)>
199 CHECK: types::<&mut _>
202 CHECK: types::<&mut _>
205 CHECK: types::<*const _>
208 CHECK: types::<*mut _>
211 ; Function signatures
213 CHECK: function::<fn()>
216 CHECK: function::<fn() -> _>
219 CHECK: function::<fn(_)>
222 CHECK: function::<fn(_, _)>
225 CHECK: function::<fn(_, _, _)>
228 CHECK: function::<unsafe fn()>
231 CHECK: function::<extern "C" fn()>
234 CHECK: function::<extern "cdecl" fn()>
235 _RIC8functionFK5cdeclEuE
237 CHECK: function::<unsafe extern "C-cmse-nonsecure-call" fn()>
238 _RIC8functionFUK21C_cmse_nonsecure_callEuE
245 CHECK: trait::<dyn for<'a> >
248 CHECK: trait::<for<'a> fn(dyn for<'b> + 'a)>
249 _RIC5traitFG_DG_EL0_EuE
251 CHECK: trait::<dyn Display>
252 _RIC5traitDC7DisplayEL_E
254 CHECK: trait::<dyn Display + Send + Sync>
255 _RIC5traitDC7DisplayC4SendC4SyncEL_E
257 CHECK: trait::<dyn for<'a> Display>
258 _RIC5traitDG_C7DisplayEL_E
260 CHECK: trait::<dyn IntoIterator<_, Item = _>>
261 _RIC5traitDIC12IntoIteratorpEp4ItempEL_E
263 CHECK: trait::<dyn IntoIterator<Item = _>>
264 _RIC5traitDC12IntoIteratorp4ItempEL_E
266 CHECK: trait::<dyn IntoIterator<Item = _, IntoIter = _>>
267 _RIC5traitDC12IntoIteratorp4Itempp8IntoIterpEL_E
269 ; Invalid trait object, missing lifetime.
276 CHECK: binders::<for<'a> fn(&'a _)>
277 _RIC7bindersFG_RL0_pEuE
279 CHECK: binders::<for<'a> fn(&'a mut _)>
280 _RIC7bindersFG_QL0_pEuE
282 CHECK: binders::<for<'a, 'b> fn(&'a _, &'b _)>
283 _RIC7bindersFG0_RL1_pRL0_pEuE
285 CHECK: binders::<for<'a, 'b> fn() -> for<'c, 'd> fn(&'a _, &'d _)>
286 _RIC7bindersFG0_EFG0_RL3_pRL0_pEuE
288 CHECK: binders::<for<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, 'q, 'r, 's, 't, 'u, 'v, 'w, 'x, 'y, 'z, 'z1, 'z2, 'z3, 'z4> fn(&'a &'b &'c &'d &'e &'f &'g &'h &'i &'j &'k &'l &'m &'n &'o &'p &'q &'r &'s &'t &'u &'v &'w &'x &'y &'z &'z1 &'z2 &'z3 &'z4 ())>
289 _RIC7bindersFGs_RLt_RLs_RLr_RLq_RLp_RLo_RLn_RLm_RLl_RLk_RLj_RLi_RLh_RLg_RLf_RLe_RLd_RLc_RLb_RLa_RL9_RL8_RL7_RL6_RL5_RL4_RL3_RL2_RL1_RL0_uEuE
291 ; Invalid binder. Too many bound lifetimes.
293 CHECK: _RIC7bindersFGFF_EuE
296 ; Integer constants. Test value demangling.
307 CHECK: integer::<-15>
310 CHECK: integer::<-16>
313 CHECK: integer::<18446744073709551615>
314 _RIC7integerKoffffffffffffffff_E
316 CHECK: integer::<0x10000000000000000>
317 _RIC7integerKo10000000000000000_E
319 CHECK: integer::<-0x123456789abcdef01>
320 _RIC7integerKnn123456789abcdef01_E
322 ; Invalid integer constant without any digits:
324 CHECK: _RIC7integerKi_E
327 ; Invalid integer constants with insignificant leading zeros:
329 CHECK: _RIC7integerKi00_E
332 CHECK: _RIC7integerKi01_E
335 ; Integer constants. Test all integer types.
381 ; Invalid bool constants
383 CHECK: _RIC4boolKb2_E
386 CHECK: _RIC4boolKbn0_E
412 CHECK: char::<'\u{1f40d}'>
415 CHECK: char::<'\u{10ffff}'>
418 ; Invalid char constants
420 CHECK: _RIC4charKc1234567_E
425 CHECK: backref::<backref::ident>
426 _RIC7backrefNvB0_5identE
428 CHECK: backref::<(), ()>
431 CHECK: backref::<7, 7>
432 _RIC7backrefKi7_KBa_E
434 ; Invalid backreferences
445 CHECK: _RIC7backrefSB9_E
448 CHECK: _RIC7backrefKBa_E
453 CHECK: dot (.llvm.1234)
456 CHECK: dot (.llvm.6789)
457 _RC3dotC5crate.llvm.6789
459 ; Invalid mangled characters
467 ; Invalid namespace (not in [a-zA-Z]).
469 CHECK: _RN_C5crate4main
472 ; Invalid identifier length (UINT64_MAX + 3, which happens to be ok after a wraparound).
474 CHECK: _RNvC2ab18446744073709551618xy
475 _RNvC2ab18446744073709551618xy
477 ; Mangling scheme includes an optional encoding version. When present it would
478 ; indicate an encoding we don't support yet. Check that it is rejected: