2021-05-04 01:41:30 +02:00
|
|
|
RUN: llvm-cxxfilt -n < %s | FileCheck --match-full-lines %s
|
|
|
|
|
|
|
|
CHECK: a::main
|
|
|
|
_RNvC1a4main
|
|
|
|
|
|
|
|
CHECK: hello::rust
|
|
|
|
_RNvCshGpAVYOtgW1_5hello4rust
|
|
|
|
|
|
|
|
CHECK: a::b::c
|
|
|
|
_RNvNvC1a1b1c
|
|
|
|
|
2021-05-09 22:38:13 +02:00
|
|
|
; Closure namespace
|
|
|
|
|
|
|
|
CHECK: crate::{closure#0}
|
|
|
|
_RNCC5crate0
|
|
|
|
|
|
|
|
CHECK: crate::{closure#1}
|
|
|
|
_RNCC5crates_0
|
|
|
|
|
|
|
|
CHECK: crate::{closure:foo#0}
|
|
|
|
_RNCC5crate3foo
|
|
|
|
|
|
|
|
CHECK: crate::{closure:foo#1}
|
|
|
|
_RNCC5crates_3foo
|
|
|
|
|
|
|
|
; Shim namespace
|
|
|
|
|
|
|
|
CHECK: crate::{shim:reify#0}
|
|
|
|
_RNSC5crate5reify
|
|
|
|
|
|
|
|
; Unrecognized special namespace
|
|
|
|
|
|
|
|
CHECK: crate::{Z:ident#10}
|
|
|
|
_RNZC5crates8_5ident
|
|
|
|
|
2021-05-15 23:24:16 +02:00
|
|
|
; Inherent impl
|
|
|
|
|
|
|
|
CHECK: <_>
|
|
|
|
_RMC5cratep
|
|
|
|
|
|
|
|
CHECK: <_>
|
|
|
|
_RMs_C5cratep
|
|
|
|
|
2021-05-15 23:25:24 +02:00
|
|
|
; Trait impl
|
|
|
|
|
|
|
|
CHECK: <_ as Clone>
|
|
|
|
_RXC5cratepC5Clone
|
|
|
|
|
|
|
|
CHECK: <_ as Clone>
|
|
|
|
_RXs_C5cratepC5Clone
|
|
|
|
|
2021-05-15 23:33:24 +02:00
|
|
|
; Trait definition
|
|
|
|
|
|
|
|
CHECK: <_ as Ord>
|
|
|
|
_RYpC3Ord
|
|
|
|
|
2021-05-10 17:58:20 +02:00
|
|
|
; Generic type arguments
|
|
|
|
|
|
|
|
CHECK: generic::<_>
|
|
|
|
_RIC7genericpE
|
|
|
|
|
|
|
|
CHECK: generic::<_, _>
|
|
|
|
_RIC7genericppE
|
|
|
|
|
|
|
|
CHECK: generic::<_, _, _>
|
|
|
|
_RIC7genericpppE
|
|
|
|
|
2021-05-14 02:00:00 +02:00
|
|
|
; Generic const arguments
|
|
|
|
|
|
|
|
CHECK: generic_const::<_>
|
|
|
|
_RIC13generic_constKpE
|
|
|
|
|
2021-05-10 17:58:20 +02:00
|
|
|
; Basic types
|
|
|
|
|
|
|
|
CHECK: basic::<i8>
|
|
|
|
_RIC5basicaE
|
|
|
|
|
|
|
|
CHECK: basic::<bool>
|
|
|
|
_RIC5basicbE
|
|
|
|
|
|
|
|
CHECK: basic::<char>
|
|
|
|
_RIC5basiccE
|
|
|
|
|
|
|
|
CHECK: basic::<f64>
|
|
|
|
_RIC5basicdE
|
|
|
|
|
|
|
|
CHECK: basic::<str>
|
|
|
|
_RIC5basiceE
|
|
|
|
|
|
|
|
CHECK: basic::<f32>
|
|
|
|
_RIC5basicfE
|
|
|
|
|
|
|
|
CHECK: basic::<u8>
|
|
|
|
_RIC5basichE
|
|
|
|
|
|
|
|
CHECK: basic::<isize>
|
|
|
|
_RIC5basiciE
|
|
|
|
|
|
|
|
CHECK: basic::<usize>
|
|
|
|
_RIC5basicjE
|
|
|
|
|
|
|
|
CHECK: basic::<i32>
|
|
|
|
_RIC5basiclE
|
|
|
|
|
|
|
|
CHECK: basic::<u32>
|
|
|
|
_RIC5basicmE
|
|
|
|
|
|
|
|
CHECK: basic::<i128>
|
|
|
|
_RIC5basicnE
|
|
|
|
|
|
|
|
CHECK: basic::<u128>
|
|
|
|
_RIC5basicoE
|
|
|
|
|
|
|
|
CHECK: basic::<_>
|
|
|
|
_RIC5basicpE
|
|
|
|
|
|
|
|
CHECK: basic::<i16>
|
|
|
|
_RIC5basicsE
|
|
|
|
|
|
|
|
CHECK: basic::<u16>
|
|
|
|
_RIC5basictE
|
|
|
|
|
|
|
|
CHECK: basic::<()>
|
|
|
|
_RIC5basicuE
|
|
|
|
|
|
|
|
CHECK: basic::<...>
|
|
|
|
_RIC5basicvE
|
|
|
|
|
|
|
|
CHECK: basic::<i64>
|
|
|
|
_RIC5basicxE
|
|
|
|
|
|
|
|
CHECK: basic::<u64>
|
|
|
|
_RIC5basicyE
|
|
|
|
|
|
|
|
CHECK: basic::<!>
|
|
|
|
_RIC5basiczE
|
|
|
|
|
2021-05-18 18:13:21 +02:00
|
|
|
; Named types. Test possible paths productions.
|
|
|
|
|
|
|
|
CHECK: named::<name>
|
|
|
|
_RIC5namedC4nameE
|
|
|
|
|
|
|
|
CHECK: named::<<_>>
|
|
|
|
_RIC5namedMC5cratepE
|
|
|
|
|
|
|
|
CHECK: named::<<_ as Name>>
|
|
|
|
_RIC5namedXC5cratepC4NameE
|
|
|
|
|
|
|
|
CHECK: named::<<_ as Name>>
|
|
|
|
_RIC5namedYpC4NameE
|
|
|
|
|
|
|
|
CHECK: named::<name::Name>
|
|
|
|
_RIC5namedNvC4name4NameE
|
|
|
|
|
|
|
|
CHECK: named::<Name<>>
|
|
|
|
_RIC5namedIC4NameEE
|
|
|
|
|
2021-05-14 02:00:00 +02:00
|
|
|
; Integer constants. Test value demangling.
|
|
|
|
|
|
|
|
CHECK: integer::<0>
|
|
|
|
_RIC7integerKi0_E
|
|
|
|
|
|
|
|
CHECK: integer::<1>
|
|
|
|
_RIC7integerKi1_E
|
|
|
|
|
|
|
|
CHECK: integer::<-1>
|
|
|
|
_RIC7integerKin1_E
|
|
|
|
|
|
|
|
CHECK: integer::<-15>
|
|
|
|
_RIC7integerKinf_E
|
|
|
|
|
|
|
|
CHECK: integer::<-16>
|
|
|
|
_RIC7integerKin10_E
|
|
|
|
|
|
|
|
CHECK: integer::<18446744073709551615>
|
|
|
|
_RIC7integerKoffffffffffffffff_E
|
|
|
|
|
|
|
|
CHECK: integer::<0x10000000000000000>
|
|
|
|
_RIC7integerKo10000000000000000_E
|
|
|
|
|
|
|
|
CHECK: integer::<-0x123456789abcdef01>
|
|
|
|
_RIC7integerKnn123456789abcdef01_E
|
|
|
|
|
|
|
|
; Invalid integer constant without any digits:
|
|
|
|
|
|
|
|
CHECK: _RIC7integerKi_E
|
|
|
|
_RIC7integerKi_E
|
|
|
|
|
|
|
|
; Invalid integer constants with insignificant leading zeros:
|
|
|
|
|
|
|
|
CHECK: _RIC7integerKi00_E
|
|
|
|
_RIC7integerKi00_E
|
|
|
|
|
|
|
|
CHECK: _RIC7integerKi01_E
|
|
|
|
_RIC7integerKi01_E
|
|
|
|
|
|
|
|
; Integer constants. Test all integer types.
|
|
|
|
|
|
|
|
CHECK: i8::<0>
|
|
|
|
_RIC2i8Ka0_E
|
|
|
|
|
|
|
|
CHECK: u8::<0>
|
|
|
|
_RIC2u8Kh0_E
|
|
|
|
|
|
|
|
CHECK: isize::<0>
|
|
|
|
_RIC5isizeKi0_E
|
|
|
|
|
|
|
|
CHECK: usize::<0>
|
|
|
|
_RIC5usizeKj0_E
|
|
|
|
|
|
|
|
CHECK: i32::<0>
|
|
|
|
_RIC3i32Kl0_E
|
|
|
|
|
|
|
|
CHECK: u32::<0>
|
|
|
|
_RIC3u32Km0_E
|
|
|
|
|
|
|
|
CHECK: i128::<0>
|
|
|
|
_RIC4i128Kn0_E
|
|
|
|
|
|
|
|
CHECK: u128::<0>
|
|
|
|
_RIC4u128Ko0_E
|
|
|
|
|
|
|
|
CHECK: i16::<0>
|
|
|
|
_RIC3i16Ks0_E
|
|
|
|
|
|
|
|
CHECK: u16::<0>
|
|
|
|
_RIC3u16Kt0_E
|
|
|
|
|
|
|
|
CHECK: i64::<0>
|
|
|
|
_RIC3i64Kx0_E
|
|
|
|
|
|
|
|
CHECK: u64::<0>
|
|
|
|
_RIC3u64Ky0_E
|
|
|
|
|
2021-05-14 02:00:00 +02:00
|
|
|
; Bool constants
|
|
|
|
|
|
|
|
CHECK: bool::<false>
|
|
|
|
_RIC4boolKb0_E
|
|
|
|
|
|
|
|
CHECK: bool::<true>
|
|
|
|
_RIC4boolKb1_E
|
|
|
|
|
|
|
|
; Invalid bool constants
|
|
|
|
|
|
|
|
CHECK: _RIC4boolKb2_E
|
|
|
|
_RIC4boolKb2_E
|
|
|
|
|
|
|
|
CHECK: _RIC4boolKbn0_E
|
|
|
|
_RIC4boolKbn0_E
|
|
|
|
|
2021-05-14 02:00:00 +02:00
|
|
|
; Char constants
|
|
|
|
|
|
|
|
CHECK: char::<'a'>
|
|
|
|
_RIC4charKc61_E
|
|
|
|
|
|
|
|
CHECK: char::<'"'>
|
|
|
|
_RIC4charKc22_E
|
|
|
|
|
|
|
|
CHECK: char::<'\t'>
|
|
|
|
_RIC4charKc9_E
|
|
|
|
|
|
|
|
CHECK: char::<'\r'>
|
|
|
|
_RIC4charKcd_E
|
|
|
|
|
|
|
|
CHECK: char::<'\n'>
|
|
|
|
_RIC4charKca_E
|
|
|
|
|
|
|
|
CHECK: char::<'\\'>
|
|
|
|
_RIC4charKc5c_E
|
|
|
|
|
|
|
|
CHECK: char::<'\''>
|
|
|
|
_RIC4charKc27_E
|
|
|
|
|
|
|
|
CHECK: char::<'\u{1f40d}'>
|
|
|
|
_RIC4charKc1f40d_E
|
|
|
|
|
|
|
|
CHECK: char::<'\u{10ffff}'>
|
|
|
|
_RIC4charKc10ffff_E
|
|
|
|
|
|
|
|
; Invalid char constants
|
|
|
|
|
|
|
|
CHECK: _RIC4charKc1234567_E
|
|
|
|
_RIC4charKc1234567_E
|
|
|
|
|
2021-05-04 01:41:30 +02:00
|
|
|
; Invalid mangled characters
|
|
|
|
|
|
|
|
CHECK: _RNvC2a.1c
|
|
|
|
_RNvC2a.1c
|
|
|
|
|
|
|
|
CHECK: _RNvC2a$1c
|
|
|
|
_RNvC2a$1c
|
|
|
|
|
2021-05-09 22:38:13 +02:00
|
|
|
; Invalid namespace (not in [a-zA-Z]).
|
|
|
|
|
|
|
|
CHECK: _RN_C5crate4main
|
|
|
|
_RN_C5crate4main
|
|
|
|
|
2021-05-04 01:41:30 +02:00
|
|
|
; Invalid identifier length (UINT64_MAX + 3, which happens to be ok after a wraparound).
|
|
|
|
|
|
|
|
CHECK: _RNvC2ab18446744073709551618xy
|
|
|
|
_RNvC2ab18446744073709551618xy
|
|
|
|
|
|
|
|
; Mangling scheme includes an optional encoding version. When present it would
|
|
|
|
; indicate an encoding we don't support yet. Check that it is rejected:
|
|
|
|
|
|
|
|
CHECK: _R0NvC1a4main
|
|
|
|
_R0NvC1a4main
|
|
|
|
|
|
|
|
; Early EOF
|
|
|
|
|
|
|
|
CHECK: _RNv
|
|
|
|
_RNv
|
|
|
|
|
|
|
|
CHECK: _RNvC
|
|
|
|
_RNvC
|
|
|
|
|
|
|
|
CHECK: _RNvC1a5main
|
|
|
|
_RNvC1a5main
|
|
|
|
|
|
|
|
CHECK: _RNvC1a20abc
|
|
|
|
_RNvC1a20abc
|