TypedProgram

extension TypedProgram
  • Returns the mangled representation of d.

    Declaration

    Swift

    public func mangled<T>(_ d: T) -> String where T : DeclID
  • Returns the mangled representation of t.

    Declaration

    Swift

    public func mangled<T>(_ t: T) -> String where T : TypeProtocol
  • Returns the mangled representation of w.

    Declaration

    Swift

    public func mangled(_ w: WitnessTable) -> String
  • Returns the mangled representation of f.

    Declaration

    Swift

    public func mangled(_ f: Function.ID) -> String
  • Returns the mangled representation of s, applying mangle to build it.

    Declaration

    Swift

    private func mangled<T>(
      _ s: T, applying mangle: (T, inout Mangler) -> String
    ) -> String
  • If f refers to a trait member, returns the declaration of that member along with the trait in which it is defined; returns nil otherwise.

    Declaration

    Swift

    func traitMember(referredBy f: Function.ID) -> (declaration: AnyDeclID, trait: TraitType)?
  • If f refers to the member d of trait c, returns (d, c) if d is a requirement, or (r, c) if d is a default implementation of a requirement r; returns nil otherwise.

    Declaration

    Swift

    func requirementDeclaring(
      memberReferredBy f: Function.ID
    ) -> (decl: AnyDeclID, trait: TraitType)?
  • Returns a subscript bundle reference to d, which occurs specialized by z.

    Declaration

    Swift

    func subscriptBundleReference(
      to d: SubscriptDecl.ID, specializedBy z: GenericArguments
    ) -> BundleReference<SubscriptDecl>
  • Returns a table mapping a union type discriminator to its corresponding member.

    Declaration

    Swift

    public func discriminatorToElement(in union: UnionType) -> [AnyType]
  • Returns true iff the mangled representation of a lexicographically precedes that of b.

    Declaration

    Swift

    private func isOrderedBefore(_ a: AnyType, _ b: AnyType) -> Bool