mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add a new demangler option which excludes a closure's type signature. This will be used in lldb. Closures are not subject to overloading, and so the signature will never be used to disambiguate. A demangled closure is uniquely identifiable by its index(s) and parent. Where opaque types are involved, the concrete type signature can be quite complex. This demangling option allows callers to avoid printing the underlying complex nested concrete types. Example: before: `closure #1 (Swift.Int) -> () in closure #1 (Swift.Int) -> () in main` after: `closure #1 in closure #1 in main`
22 lines
1.0 KiB
Plaintext
22 lines
1.0 KiB
Plaintext
RUN: swift-demangle -display-stdlib-module=true sSi | %FileCheck %s --check-prefix=SWIFT-INT
|
|
SWIFT-INT: {{ Swift.Int$}}
|
|
RUN: swift-demangle -display-stdlib-module=false sSi | %FileCheck %s --check-prefix=INT
|
|
INT: {{ Int$}}
|
|
|
|
RUN: swift-demangle -display-objc-module=true sSo6CGRectVD | %FileCheck %s --check-prefix=OBJC-CGRECT
|
|
OBJC-CGRECT: {{ __C.CGRect$}}
|
|
RUN: swift-demangle -display-objc-module=false sSo6CGRectVD | %FileCheck %s --check-prefix=CGRECT
|
|
CGRECT: {{ CGRect$}}
|
|
|
|
RUN: swift-demangle -hiding-module=foo _TtC3foo3bar | %FileCheck %s --check-prefix=BAR
|
|
BAR: {{ bar$}}
|
|
|
|
RUN: swift-demangle -display-local-name-contexts=true s1a4mainyyFySRys5UInt8VGXEfU4_10ByteBufferL_aD | %FileCheck %s --check-prefix=LOCAL
|
|
LOCAL: ByteBuffer #1 in closure #6
|
|
|
|
RUN: swift-demangle -display-local-name-contexts=false s1a4mainyyFySRys5UInt8VGXEfU4_10ByteBufferL_aD | %FileCheck %s --check-prefix=NOLOCAL
|
|
NOLOCAL: {{ ByteBuffer$}}
|
|
|
|
RUN: swift-demangle -show-closure-signature=false s4mainySiXEfU_ySiXEfU_ | %FileCheck %s --check-prefix=CLOSURE
|
|
CLOSURE: closure #1 in closure #1 in main
|