diff --git a/include/swift/Demangling/Demangle.h b/include/swift/Demangling/Demangle.h index 4712fb8fca5a5..e690e98579bd6 100644 --- a/include/swift/Demangling/Demangle.h +++ b/include/swift/Demangling/Demangle.h @@ -34,7 +34,6 @@ namespace Demangle { struct DemangleOptions { bool SynthesizeSugarOnTypes = false; - bool DisplayTypeOfIVarFieldOffset = true; bool DisplayDebuggerGeneratedModule = true; bool QualifyEntities = true; bool DisplayExtensionContexts = true; @@ -49,6 +48,7 @@ struct DemangleOptions { bool ShortenValueWitness = false; bool ShortenArchetype = false; bool ShowPrivateDiscriminators = true; + bool ShowFunctionArgumentTypes = true; DemangleOptions() {} @@ -68,6 +68,7 @@ struct DemangleOptions { Opt.ShortenValueWitness = true; Opt.ShortenArchetype = true; Opt.ShowPrivateDiscriminators = false; + Opt.ShowFunctionArgumentTypes = false; return Opt; }; }; diff --git a/lib/Demangling/NodePrinter.cpp b/lib/Demangling/NodePrinter.cpp index d7a228ebe0285..f6aa9b5d29630 100644 --- a/lib/Demangling/NodePrinter.cpp +++ b/lib/Demangling/NodePrinter.cpp @@ -157,7 +157,8 @@ class NodePrinter { private: DemanglerPrinter Printer; DemangleOptions Options; - + bool SpecializationPrefixPrinted = false; + public: NodePrinter(DemangleOptions options) : Options(options) {} @@ -178,28 +179,28 @@ class NodePrinter { } } - void printChildren(NodePointer pointer, const char *sep = nullptr) { - if (!pointer) + void printChildren(NodePointer Node, const char *sep = nullptr) { + if (!Node) return; - Node::iterator begin = pointer->begin(), end = pointer->end(); + Node::iterator begin = Node->begin(), end = Node->end(); printChildren(begin, end, sep); } - NodePointer getFirstChildOfKind(NodePointer pointer, Node::Kind kind) { - if (!pointer) + NodePointer getFirstChildOfKind(NodePointer Node, Node::Kind kind) { + if (!Node) return nullptr; - for (NodePointer &child : *pointer) { + for (NodePointer &child : *Node) { if (child && child->getKind() == kind) return child; } return nullptr; } - void printBoundGenericNoSugar(NodePointer pointer) { - if (pointer->getNumChildren() < 2) + void printBoundGenericNoSugar(NodePointer Node) { + if (Node->getNumChildren() < 2) return; - NodePointer typelist = pointer->getChild(1); - print(pointer->getChild(0)); + NodePointer typelist = Node->getChild(1); + print(Node->getChild(0)); Printer << "<"; printChildren(typelist, ", "); Printer << ">"; @@ -210,10 +211,16 @@ class NodePrinter { node->getText() == STDLIB_NAME); } - static bool isDebuggerGeneratedModule(NodePointer node) { - return (node->getKind() == Node::Kind::Module && - node->getText().startswith(LLDB_EXPRESSIONS_MODULE_NAME_PREFIX)); + bool printContext(NodePointer Context) { + if (!Options.QualifyEntities) + return false; + + if (Context->getKind() == Node::Kind::Module && + Context->getText().startswith(LLDB_EXPRESSIONS_MODULE_NAME_PREFIX)) { + return Options.DisplayDebuggerGeneratedModule; } + return true; + } static bool isIdentifier(NodePointer node, StringRef desired) { return (node->getKind() == Node::Kind::Identifier && @@ -227,11 +234,17 @@ class NodePrinter { Array, Dictionary }; - + + enum class TypePrinting { + NoType, + WithColon, + FunctionStyle + }; + /// Determine whether this is a "simple" type, from the type-simple /// production. - bool isSimpleType(NodePointer pointer) { - switch (pointer->getKind()) { + bool isSimpleType(NodePointer Node) { + switch (Node->getKind()) { case Node::Kind::AssociatedType: case Node::Kind::AssociatedTypeRef: case Node::Kind::BoundGenericClass: @@ -263,7 +276,7 @@ class NodePrinter { return true; case Node::Kind::ProtocolList: - return pointer->getChild(0)->getNumChildren() <= 1; + return Node->getChild(0)->getNumChildren() <= 1; case Node::Kind::ProtocolListWithClass: case Node::Kind::Allocator: @@ -396,22 +409,22 @@ class NodePrinter { printer_unreachable("bad node kind"); } - SugarType findSugar(NodePointer pointer) { - if (pointer->getNumChildren() == 1 && - pointer->getKind() == Node::Kind::Type) - return findSugar(pointer->getChild(0)); + SugarType findSugar(NodePointer Node) { + if (Node->getNumChildren() == 1 && + Node->getKind() == Node::Kind::Type) + return findSugar(Node->getChild(0)); - if (pointer->getNumChildren() != 2) + if (Node->getNumChildren() != 2) return SugarType::None; - if (pointer->getKind() != Node::Kind::BoundGenericEnum && - pointer->getKind() != Node::Kind::BoundGenericStructure) + if (Node->getKind() != Node::Kind::BoundGenericEnum && + Node->getKind() != Node::Kind::BoundGenericStructure) return SugarType::None; - auto unboundType = pointer->getChild(0)->getChild(0); // drill through Type - auto typeArgs = pointer->getChild(1); + auto unboundType = Node->getChild(0)->getChild(0); // drill through Type + auto typeArgs = Node->getChild(1); - if (pointer->getKind() == Node::Kind::BoundGenericEnum) { + if (Node->getKind() == Node::Kind::BoundGenericEnum) { // Swift.Optional if (isIdentifier(unboundType->getChild(1), "Optional") && typeArgs->getNumChildren() == 1 && @@ -430,7 +443,7 @@ class NodePrinter { return SugarType::None; } - assert(pointer->getKind() == Node::Kind::BoundGenericStructure); + assert(Node->getKind() == Node::Kind::BoundGenericStructure); // Array if (isIdentifier(unboundType->getChild(1), "Array") && @@ -449,31 +462,31 @@ class NodePrinter { return SugarType::None; } - void printBoundGeneric(NodePointer pointer) { - if (pointer->getNumChildren() < 2) + void printBoundGeneric(NodePointer Node) { + if (Node->getNumChildren() < 2) return; - if (pointer->getNumChildren() != 2) { - printBoundGenericNoSugar(pointer); + if (Node->getNumChildren() != 2) { + printBoundGenericNoSugar(Node); return; } if (!Options.SynthesizeSugarOnTypes || - pointer->getKind() == Node::Kind::BoundGenericClass) + Node->getKind() == Node::Kind::BoundGenericClass) { // no sugar here - printBoundGenericNoSugar(pointer); + printBoundGenericNoSugar(Node); return; } - SugarType sugarType = findSugar(pointer); + SugarType sugarType = findSugar(Node); switch (sugarType) { case SugarType::None: - printBoundGenericNoSugar(pointer); + printBoundGenericNoSugar(Node); break; case SugarType::Optional: case SugarType::ImplicitlyUnwrappedOptional: { - NodePointer type = pointer->getChild(1)->getChild(0); + NodePointer type = Node->getChild(1)->getChild(0); bool needs_parens = !isSimpleType(type); if (needs_parens) Printer << "("; @@ -484,15 +497,15 @@ class NodePrinter { break; } case SugarType::Array: { - NodePointer type = pointer->getChild(1)->getChild(0); + NodePointer type = Node->getChild(1)->getChild(0); Printer << "["; print(type); Printer << "]"; break; } case SugarType::Dictionary: { - NodePointer keyType = pointer->getChild(1)->getChild(0); - NodePointer valueType = pointer->getChild(1)->getChild(1); + NodePointer keyType = Node->getChild(1)->getChild(0); + NodePointer valueType = Node->getChild(1)->getChild(1); Printer << "["; print(keyType); Printer << " : "; @@ -503,8 +516,6 @@ class NodePrinter { } } - void printSimplifiedEntityType(NodePointer context, NodePointer entityType); - void printFunctionType(NodePointer node) { assert(node->getNumChildren() == 2 || node->getNumChildren() == 3); unsigned startIndex = 0; @@ -514,9 +525,37 @@ class NodePrinter { startIndex++; throws = true; } - print(node->getChild(startIndex)); - if (throws) Printer << " throws"; - print(node->getChild(startIndex+1)); + if (Options.ShowFunctionArgumentTypes) { + print(node->getChild(startIndex)); + if (throws) Printer << " throws"; + print(node->getChild(startIndex+1)); + return; + } + // Print simplified arguments + NodePointer Args = node->getChild(startIndex); + assert(Args->getKind() == Node::Kind::ArgumentTuple); + Args = Args->getFirstChild(); + assert(Args->getKind() == Node::Kind::Type); + Args = Args->getFirstChild(); + if (Args->getKind() != Node::Kind::Tuple) { + // only a single not-named argument + Printer << "(_:)"; + return; + } + Printer << '('; + for (NodePointer Arg : *Args) { + assert(Arg->getKind() == Node::Kind::TupleElement); + unsigned NameIdx = 0; + if (Arg->getFirstChild()->getKind() == Node::Kind::VariadicMarker) + NameIdx = 1; + if (Arg->getChild(NameIdx)->getKind() == Node::Kind::TupleElementName) { + Printer << Arg->getChild(NameIdx)->getText(); + } else { + Printer << '_'; + } + Printer << ':'; + } + Printer << ')'; } void printImplFunctionType(NodePointer fn) { @@ -553,25 +592,32 @@ class NodePrinter { Printer << ')'; } - void printContext(NodePointer context) { - // TODO: parenthesize local contexts? - if (Options.DisplayDebuggerGeneratedModule || - !isDebuggerGeneratedModule(context)) - { - print(context, /*asContext*/ true); - if (context->getKind() == Node::Kind::Module && !Options.DisplayModuleNames) - return; - Printer << '.'; - } - } - - void print(NodePointer pointer, bool asContext = false, bool suppressType = false); - - unsigned printFunctionSigSpecializationParam(NodePointer pointer, + unsigned printFunctionSigSpecializationParam(NodePointer Node, unsigned Idx); void printSpecializationPrefix(NodePointer node, StringRef Description, StringRef ParamPrefix = StringRef()); + + /// The main big print function. + NodePointer print(NodePointer Node, bool asPrefixContext = false); + + /// Utility function to print entities. + /// + /// \param Entity The entity node to print + /// \param asPrefixContext Should the entity printed as a context which as a + /// prefix to another entity, e.g. the Abc in Abc.def() + /// \param TypePr How should the type of the entity be printed, if at all. + /// E.g. with a colon for properties or as a function type. + /// \param hasName Does the entity has a name, e.g. a function in contrast to + /// an initializer. + /// \param ExtraName An extra name added to the entity name (if any). + /// \param ExtraIndex An extra index added to the entity name (if any), + /// e.g. closure #1 + /// \return If a non-null node is returned it's a context which must be + /// printed in postfix-form after the entity: " in ". + NodePointer printEntity(NodePointer Entity, bool asPrefixContext, + TypePrinting TypePr, bool hasName, + StringRef ExtraName = "", int ExtraIndex = -1); }; } // end anonymous namespace @@ -582,22 +628,22 @@ static bool isExistentialType(NodePointer node) { } /// Print the relevant parameters and return the new index. -unsigned NodePrinter::printFunctionSigSpecializationParam(NodePointer pointer, +unsigned NodePrinter::printFunctionSigSpecializationParam(NodePointer Node, unsigned Idx) { - NodePointer firstChild = pointer->getChild(Idx); + NodePointer firstChild = Node->getChild(Idx); unsigned V = firstChild->getIndex(); auto K = FunctionSigSpecializationParamKind(V); switch (K) { case FunctionSigSpecializationParamKind::BoxToValue: case FunctionSigSpecializationParamKind::BoxToStack: - print(pointer->getChild(Idx++)); + print(Node->getChild(Idx++)); return Idx; case FunctionSigSpecializationParamKind::ConstantPropFunction: case FunctionSigSpecializationParamKind::ConstantPropGlobal: { Printer << "["; - print(pointer->getChild(Idx++)); + print(Node->getChild(Idx++)); Printer << " : "; - const auto &text = pointer->getChild(Idx++)->getText(); + const auto &text = Node->getChild(Idx++)->getText(); std::string demangledName = demangleSymbolAsString(text); if (demangledName.empty()) { Printer << text; @@ -610,29 +656,29 @@ unsigned NodePrinter::printFunctionSigSpecializationParam(NodePointer pointer, case FunctionSigSpecializationParamKind::ConstantPropInteger: case FunctionSigSpecializationParamKind::ConstantPropFloat: Printer << "["; - print(pointer->getChild(Idx++)); + print(Node->getChild(Idx++)); Printer << " : "; - print(pointer->getChild(Idx++)); + print(Node->getChild(Idx++)); Printer << "]"; return Idx; case FunctionSigSpecializationParamKind::ConstantPropString: Printer << "["; - print(pointer->getChild(Idx++)); + print(Node->getChild(Idx++)); Printer << " : "; - print(pointer->getChild(Idx++)); + print(Node->getChild(Idx++)); Printer << "'"; - print(pointer->getChild(Idx++)); + print(Node->getChild(Idx++)); Printer << "'"; Printer << "]"; return Idx; case FunctionSigSpecializationParamKind::ClosureProp: Printer << "["; - print(pointer->getChild(Idx++)); + print(Node->getChild(Idx++)); Printer << " : "; - print(pointer->getChild(Idx++)); + print(Node->getChild(Idx++)); Printer << ", Argument Types : ["; - for (unsigned e = pointer->getNumChildren(); Idx < e;) { - NodePointer child = pointer->getChild(Idx); + for (unsigned e = Node->getNumChildren(); Idx < e;) { + NodePointer child = Node->getChild(Idx); // Until we no longer have a type node, keep demangling. if (child->getKind() != Node::Kind::Type) break; @@ -640,7 +686,7 @@ unsigned NodePrinter::printFunctionSigSpecializationParam(NodePointer pointer, ++Idx; // If we are not done, print the ", ". - if (Idx < e && pointer->getChild(Idx)->hasText()) + if (Idx < e && Node->getChild(Idx)->hasText()) Printer << ", "; } Printer << "]"; @@ -654,7 +700,7 @@ unsigned NodePrinter::printFunctionSigSpecializationParam(NodePointer pointer, (V & unsigned(FunctionSigSpecializationParamKind::SROA)) || (V & unsigned(FunctionSigSpecializationParamKind::Dead))) && "Invalid OptionSet"); - print(pointer->getChild(Idx++)); + print(Node->getChild(Idx++)); return Idx; } @@ -662,7 +708,10 @@ void NodePrinter::printSpecializationPrefix(NodePointer node, StringRef Description, StringRef ParamPrefix) { if (!Options.DisplayGenericSpecializations) { - Printer << "specialized "; + if (!SpecializationPrefixPrinted) { + Printer << "specialized "; + SpecializationPrefixPrinted = true; + } return; } Printer << Description << " <"; @@ -693,255 +742,156 @@ void NodePrinter::printSpecializationPrefix(NodePointer node, Printer << "> of "; } -static bool isClassType(NodePointer pointer) { - return pointer->getKind() == Node::Kind::Class; -} - -static bool useColonForEntityType(NodePointer entity, NodePointer type) { - switch (entity->getKind()) { - case Node::Kind::Variable: - case Node::Kind::Initializer: - case Node::Kind::DefaultArgumentInitializer: - case Node::Kind::IVarInitializer: - case Node::Kind::Class: - case Node::Kind::Structure: - case Node::Kind::Enum: - case Node::Kind::Protocol: - case Node::Kind::TypeAlias: - case Node::Kind::OwningAddressor: - case Node::Kind::OwningMutableAddressor: - case Node::Kind::NativeOwningAddressor: - case Node::Kind::NativeOwningMutableAddressor: - case Node::Kind::NativePinningAddressor: - case Node::Kind::NativePinningMutableAddressor: - case Node::Kind::UnsafeAddressor: - case Node::Kind::UnsafeMutableAddressor: - case Node::Kind::GlobalGetter: - case Node::Kind::Getter: - case Node::Kind::Setter: - case Node::Kind::MaterializeForSet: - case Node::Kind::WillSet: - case Node::Kind::DidSet: - return true; - - case Node::Kind::Subscript: - case Node::Kind::Function: - case Node::Kind::ExplicitClosure: - case Node::Kind::ImplicitClosure: - case Node::Kind::Allocator: - case Node::Kind::Constructor: - case Node::Kind::Destructor: - case Node::Kind::Deallocator: - case Node::Kind::IVarDestroyer: { - // We expect to see a function type here, but if we don't, use the colon. - type = type->getChild(0); - while (type->getKind() == Node::Kind::DependentGenericType) - type = type->getChild(1)->getChild(0); - return (type->getKind() != Node::Kind::FunctionType && - type->getKind() != Node::Kind::UncurriedFunctionType && - type->getKind() != Node::Kind::CFunctionPointer && - type->getKind() != Node::Kind::ThinFunctionType); - } - - default: - printer_unreachable("not an entity"); - } -} - -static bool isMethodContext(const NodePointer &context) { - switch (context->getKind()) { - case Node::Kind::Structure: - case Node::Kind::Enum: - case Node::Kind::Class: - case Node::Kind::Protocol: - case Node::Kind::Extension: - return true; - default: - return false; - } +static bool isClassType(NodePointer Node) { + return Node->getKind() == Node::Kind::Class; } -/// Perform any desired type simplifications for an entity in Simplified mode. -void NodePrinter::printSimplifiedEntityType(NodePointer context, - NodePointer entityType) { - // Only do anything special to methods. - if (!isMethodContext(context)) return print(entityType); - - // Strip off a single level of uncurried function type. - NodePointer type = entityType; - assert(type->getKind() == Node::Kind::Type); - type = type->getChild(0); - - if (type->getKind() == Node::Kind::DependentGenericType) { - type = type->getChild(1)->getChild(0); +static bool needSpaceBeforeType(NodePointer Type) { + switch (Type->getKind()) { + case Node::Kind::Type: + return needSpaceBeforeType(Type->getFirstChild()); + case Node::Kind::FunctionType: + case Node::Kind::UncurriedFunctionType: + case Node::Kind::DependentGenericType: + return false; + default: + return true; } - - print(entityType); } -void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType) { - // Common code for handling entities. - auto printEntity = [&](bool hasName, bool hasType, StringRef extraName) { - if (Options.QualifyEntities) - printContext(pointer->getChild(0)); - - bool printType = (hasType && !suppressType); - bool useParens = (printType && asContext); - - if (useParens) Printer << '('; - - if (hasName) print(pointer->getChild(1)); - Printer << extraName; - - if (printType) { - NodePointer type = pointer->getChild(1 + unsigned(hasName)); - if (useColonForEntityType(pointer, type)) { - if (Options.DisplayEntityTypes) { - Printer << " : "; - print(type); - } - } else if (!Options.DisplayEntityTypes) { - printSimplifiedEntityType(pointer->getChild(0), type); - } else { - Printer << " "; - print(type); - } - } - - if (useParens) Printer << ')'; - }; - - Node::Kind kind = pointer->getKind(); - switch (kind) { +NodePointer NodePrinter::print(NodePointer Node, bool asPrefixContext) { + switch (Node->getKind()) { case Node::Kind::Static: Printer << "static "; - print(pointer->getChild(0), asContext, suppressType); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::CurryThunk: Printer << "curry thunk of "; - print(pointer->getChild(0), asContext, suppressType); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::OutlinedCopy: Printer << "outlined copy of "; - print(pointer->getChild(0), asContext, suppressType); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::OutlinedConsume: Printer << "outlined consume of "; - print(pointer->getChild(0), asContext, suppressType); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::Directness: - Printer << toString(Directness(pointer->getIndex())) << " "; - return; + Printer << toString(Directness(Node->getIndex())) << " "; + return nullptr; case Node::Kind::Extension: - assert((pointer->getNumChildren() == 2 || pointer->getNumChildren() == 3) + assert((Node->getNumChildren() == 2 || Node->getNumChildren() == 3) && "Extension expects 2 or 3 children."); if (Options.QualifyEntities && Options.DisplayExtensionContexts) { Printer << "(extension in "; // Print the module where extension is defined. - print(pointer->getChild(0), true); + print(Node->getChild(0), true); Printer << "):"; } - print(pointer->getChild(1), asContext); - if (pointer->getNumChildren() == 3) - print(pointer->getChild(2), true); - return; + print(Node->getChild(1)); + if (Node->getNumChildren() == 3) + print(Node->getChild(2)); + return nullptr; case Node::Kind::Variable: + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true); case Node::Kind::Function: case Node::Kind::Subscript: + return printEntity(Node, asPrefixContext, TypePrinting::FunctionStyle, + /*hasName*/true); case Node::Kind::GenericTypeParamDecl: - printEntity(true, true, ""); - return; + return printEntity(Node, asPrefixContext, TypePrinting::NoType, + /*hasName*/true); case Node::Kind::ExplicitClosure: - case Node::Kind::ImplicitClosure: { - auto index = pointer->getChild(1)->getIndex(); - DemanglerPrinter printName; - printName << '('; - if (pointer->getKind() == Node::Kind::ImplicitClosure) - printName << "implicit "; - printName << "closure #" << (index + 1) << ")"; - printEntity(false, false, std::move(printName).str()); - return; - } + return printEntity(Node, asPrefixContext, + Options.ShowFunctionArgumentTypes ? + TypePrinting::FunctionStyle : TypePrinting::NoType, + /*hasName*/false, "closure #", + (int)Node->getChild(1)->getIndex() + 1); + case Node::Kind::ImplicitClosure: + return printEntity(Node, asPrefixContext, + Options.ShowFunctionArgumentTypes ? + TypePrinting::FunctionStyle : TypePrinting::NoType, + /*hasName*/false, "implicit closure #", + (int)Node->getChild(1)->getIndex() + 1); case Node::Kind::Global: - printChildren(pointer); - return; + printChildren(Node); + return nullptr; case Node::Kind::Suffix: - if (!Options.DisplayUnmangledSuffix) return; - Printer << " with unmangled suffix " << QuotedString(pointer->getText()); - return; + if (Options.DisplayUnmangledSuffix) { + Printer << " with unmangled suffix " << QuotedString(Node->getText()); + } + return nullptr; case Node::Kind::Initializer: - printEntity(false, false, "(variable initialization expression)"); - return; - case Node::Kind::DefaultArgumentInitializer: { - auto index = pointer->getChild(1); - DemanglerPrinter strPrinter; - strPrinter << "(default argument " << index->getIndex() << ")"; - printEntity(false, false, std::move(strPrinter).str()); - return; - } + return printEntity(Node, asPrefixContext, TypePrinting::NoType, + /*hasName*/false, "variable initialization expression"); + case Node::Kind::DefaultArgumentInitializer: + return printEntity(Node, asPrefixContext, TypePrinting::NoType, + /*hasName*/false, "default argument ", + (int)Node->getChild(1)->getIndex()); case Node::Kind::DeclContext: - print(pointer->getChild(0), asContext); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::Type: - print(pointer->getChild(0), asContext); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::TypeMangling: - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::Class: case Node::Kind::Structure: case Node::Kind::Enum: case Node::Kind::Protocol: case Node::Kind::TypeAlias: - printEntity(true, false, ""); - return; + return printEntity(Node, asPrefixContext, TypePrinting::NoType, + /*hasName*/true); case Node::Kind::LocalDeclName: - Printer << '('; - print(pointer->getChild(1)); - Printer << " #" << (pointer->getChild(0)->getIndex() + 1) << ')'; - return; + print(Node->getChild(1)); + Printer << " #" << (Node->getChild(0)->getIndex() + 1); + return nullptr; case Node::Kind::PrivateDeclName: if (Options.ShowPrivateDiscriminators) Printer << '('; - print(pointer->getChild(1)); + print(Node->getChild(1)); if (Options.ShowPrivateDiscriminators) - Printer << " in " << pointer->getChild(0)->getText() << ')'; - return; + Printer << " in " << Node->getChild(0)->getText() << ')'; + return nullptr; case Node::Kind::Module: if (Options.DisplayModuleNames) - Printer << pointer->getText(); - return; + Printer << Node->getText(); + return nullptr; case Node::Kind::Identifier: - Printer << pointer->getText(); - return; + Printer << Node->getText(); + return nullptr; case Node::Kind::Index: - Printer << pointer->getIndex(); - return; + Printer << Node->getIndex(); + return nullptr; case Node::Kind::AutoClosureType: Printer << "@autoclosure "; - printFunctionType(pointer); - return; + printFunctionType(Node); + return nullptr; case Node::Kind::ThinFunctionType: Printer << "@convention(thin) "; - printFunctionType(pointer); - return; + printFunctionType(Node); + return nullptr; case Node::Kind::FunctionType: case Node::Kind::UncurriedFunctionType: - printFunctionType(pointer); - return; + printFunctionType(Node); + return nullptr; case Node::Kind::ArgumentTuple: { bool need_parens = false; - if (pointer->getNumChildren() > 1) + if (Node->getNumChildren() > 1) need_parens = true; else { - if (!pointer->hasChildren()) + if (!Node->hasChildren()) need_parens = true; else { - Node::Kind child0_kind = pointer->getChild(0)->getKind(); + Node::Kind child0_kind = Node->getChild(0)->getKind(); if (child0_kind == Node::Kind::Type) - child0_kind = pointer->getChild(0)->getChild(0)->getKind(); + child0_kind = Node->getChild(0)->getChild(0)->getKind(); if (child0_kind != Node::Kind::Tuple) need_parens = true; @@ -949,31 +899,31 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType) } if (need_parens) Printer << "("; - printChildren(pointer); + printChildren(Node); if (need_parens) Printer << ")"; - return; + return nullptr; } case Node::Kind::Tuple: { Printer << "("; - printChildren(pointer, ", "); + printChildren(Node, ", "); Printer << ")"; - return; + return nullptr; } case Node::Kind::TupleElement: { unsigned Idx = 0; bool isVariadic = false; - if (pointer->getNumChildren() >= 1 && - pointer->getFirstChild()->getKind() == Node::Kind::VariadicMarker) { + if (Node->getNumChildren() >= 1 && + Node->getFirstChild()->getKind() == Node::Kind::VariadicMarker) { isVariadic = true; Idx++; } NodePointer type = nullptr; - if (pointer->getNumChildren() == Idx + 1) { - type = pointer->getChild(Idx); - } else if (pointer->getNumChildren() == Idx + 2) { - NodePointer id = pointer->getChild(Idx); - type = pointer->getChild(Idx + 1); + if (Node->getNumChildren() == Idx + 1) { + type = Node->getChild(Idx); + } else if (Node->getNumChildren() == Idx + 2) { + NodePointer id = Node->getChild(Idx); + type = Node->getChild(Idx + 1); print(id); } if (isVariadic) { @@ -985,103 +935,105 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType) } else { print(type); } - return; + return nullptr; } case Node::Kind::TupleElementName: - Printer << pointer->getText() << " : "; - return; + Printer << Node->getText() << ": "; + return nullptr; case Node::Kind::ReturnType: - if (pointer->getNumChildren() == 0) - Printer << " -> " << pointer->getText(); + if (Node->getNumChildren() == 0) + Printer << " -> " << Node->getText(); else { Printer << " -> "; - printChildren(pointer); + printChildren(Node); } - return; + return nullptr; case Node::Kind::Weak: Printer << "weak "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::Unowned: Printer << "unowned "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::Unmanaged: Printer << "unowned(unsafe) "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::InOut: Printer << "inout "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::NonObjCAttribute: Printer << "@nonobjc "; - return; + return nullptr; case Node::Kind::ObjCAttribute: Printer << "@objc "; - return; + return nullptr; case Node::Kind::DirectMethodReferenceAttribute: Printer << "super "; - return; + return nullptr; case Node::Kind::DynamicAttribute: Printer << "dynamic "; - return; + return nullptr; case Node::Kind::VTableAttribute: Printer << "override "; - return; + return nullptr; case Node::Kind::FunctionSignatureSpecialization: - return printSpecializationPrefix(pointer, - "function signature specialization"); + printSpecializationPrefix(Node, "function signature specialization"); + return nullptr; case Node::Kind::GenericPartialSpecialization: - return printSpecializationPrefix(pointer, - "generic partial specialization", "Signature = "); + printSpecializationPrefix(Node, "generic partial specialization", + "Signature = "); + return nullptr; case Node::Kind::GenericPartialSpecializationNotReAbstracted: - return printSpecializationPrefix(pointer, - "generic not-reabstracted partial specialization", "Signature = "); + printSpecializationPrefix(Node, + "generic not-reabstracted partial specialization", "Signature = "); + return nullptr; case Node::Kind::GenericSpecialization: - return printSpecializationPrefix(pointer, - "generic specialization"); + printSpecializationPrefix(Node, "generic specialization"); + return nullptr; case Node::Kind::GenericSpecializationNotReAbstracted: - return printSpecializationPrefix(pointer, - "generic not re-abstracted specialization"); + printSpecializationPrefix(Node, "generic not re-abstracted specialization"); + return nullptr; case Node::Kind::SpecializationIsFragile: Printer << "preserving fragile attribute"; - return; + return nullptr; case Node::Kind::GenericSpecializationParam: - print(pointer->getChild(0)); - for (unsigned i = 1, e = pointer->getNumChildren(); i < e; ++i) { + print(Node->getChild(0)); + for (unsigned i = 1, e = Node->getNumChildren(); i < e; ++i) { if (i == 1) Printer << " with "; else Printer << " and "; - print(pointer->getChild(i)); + print(Node->getChild(i)); } - return; + return nullptr; case Node::Kind::FunctionSignatureSpecializationParam: { - uint64_t argNum = pointer->getIndex(); + uint64_t argNum = Node->getIndex(); Printer << "Arg[" << argNum << "] = "; - unsigned Idx = printFunctionSigSpecializationParam(pointer, 0); + unsigned Idx = printFunctionSigSpecializationParam(Node, 0); - for (unsigned e = pointer->getNumChildren(); Idx < e;) { + for (unsigned e = Node->getNumChildren(); Idx < e;) { Printer << " and "; - Idx = printFunctionSigSpecializationParam(pointer, Idx); + Idx = printFunctionSigSpecializationParam(Node, Idx); } - return; + return nullptr; } case Node::Kind::FunctionSignatureSpecializationParamPayload: { - std::string demangledName = demangleSymbolAsString(pointer->getText()); + std::string demangledName = demangleSymbolAsString(Node->getText()); if (demangledName.empty()) { - Printer << pointer->getText(); + Printer << Node->getText(); } else { Printer << demangledName; } - return; + return nullptr; } case Node::Kind::FunctionSignatureSpecializationParamKind: { - uint64_t raw = pointer->getIndex(); + uint64_t raw = Node->getIndex(); bool printedOptionSet = false; if (raw & uint64_t(FunctionSigSpecializationParamKind::Dead)) { @@ -1100,103 +1052,103 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType) if (printedOptionSet) Printer << " and "; Printer << "Exploded"; - return; + return nullptr; } if (printedOptionSet) - return; + return nullptr; switch (FunctionSigSpecializationParamKind(raw)) { case FunctionSigSpecializationParamKind::BoxToValue: Printer << "Value Promoted from Box"; - break; + return nullptr; case FunctionSigSpecializationParamKind::BoxToStack: Printer << "Stack Promoted from Box"; - break; + return nullptr; case FunctionSigSpecializationParamKind::ConstantPropFunction: Printer << "Constant Propagated Function"; - break; + return nullptr; case FunctionSigSpecializationParamKind::ConstantPropGlobal: Printer << "Constant Propagated Global"; - break; + return nullptr; case FunctionSigSpecializationParamKind::ConstantPropInteger: Printer << "Constant Propagated Integer"; - break; + return nullptr; case FunctionSigSpecializationParamKind::ConstantPropFloat: Printer << "Constant Propagated Float"; - break; + return nullptr; case FunctionSigSpecializationParamKind::ConstantPropString: Printer << "Constant Propagated String"; - break; + return nullptr; case FunctionSigSpecializationParamKind::ClosureProp: Printer << "Closure Propagated"; - break; + return nullptr; case FunctionSigSpecializationParamKind::Dead: case FunctionSigSpecializationParamKind::OwnedToGuaranteed: case FunctionSigSpecializationParamKind::SROA: printer_unreachable("option sets should have been handled earlier"); } - return; + return nullptr; } case Node::Kind::SpecializationPassID: - Printer << pointer->getIndex(); - return; + Printer << Node->getIndex(); + return nullptr; case Node::Kind::BuiltinTypeName: - Printer << pointer->getText(); - return; + Printer << Node->getText(); + return nullptr; case Node::Kind::Number: - Printer << pointer->getIndex(); - return; + Printer << Node->getIndex(); + return nullptr; case Node::Kind::InfixOperator: - Printer << pointer->getText() << " infix"; - return; + Printer << Node->getText() << " infix"; + return nullptr; case Node::Kind::PrefixOperator: - Printer << pointer->getText() << " prefix"; - return; + Printer << Node->getText() << " prefix"; + return nullptr; case Node::Kind::PostfixOperator: - Printer << pointer->getText() << " postfix"; - return; + Printer << Node->getText() << " postfix"; + return nullptr; case Node::Kind::LazyProtocolWitnessTableAccessor: Printer << "lazy protocol witness table accessor for type "; - print(pointer->getChild(0)); + print(Node->getChild(0)); Printer << " and conformance "; - print(pointer->getChild(1)); - return; + print(Node->getChild(1)); + return nullptr; case Node::Kind::LazyProtocolWitnessTableCacheVariable: Printer << "lazy protocol witness table cache variable for type "; - print(pointer->getChild(0)); + print(Node->getChild(0)); Printer << " and conformance "; - print(pointer->getChild(1)); - return; + print(Node->getChild(1)); + return nullptr; case Node::Kind::ProtocolWitnessTableAccessor: Printer << "protocol witness table accessor for "; - print(pointer->getFirstChild()); - return; + print(Node->getFirstChild()); + return nullptr; case Node::Kind::ProtocolWitnessTable: Printer << "protocol witness table for "; - print(pointer->getFirstChild()); - return; + print(Node->getFirstChild()); + return nullptr; case Node::Kind::GenericProtocolWitnessTable: Printer << "generic protocol witness table for "; - print(pointer->getFirstChild()); - return; + print(Node->getFirstChild()); + return nullptr; case Node::Kind::GenericProtocolWitnessTableInstantiationFunction: Printer << "instantiation function for generic protocol witness table for "; - print(pointer->getFirstChild()); - return; + print(Node->getFirstChild()); + return nullptr; case Node::Kind::VTableThunk: { Printer << "vtable thunk for "; - print(pointer->getChild(1)); + print(Node->getChild(1)); Printer << " dispatching to "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; } case Node::Kind::ProtocolWitness: { Printer << "protocol witness for "; - print(pointer->getChild(1)); + print(Node->getChild(1)); Printer << " in conformance "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; } case Node::Kind::PartialApplyForwarder: if (Options.ShortenPartialApply) @@ -1204,145 +1156,144 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType) else Printer << "partial apply forwarder"; - if (pointer->hasChildren()) { + if (Node->hasChildren()) { Printer << " for "; - print(pointer->getFirstChild()); + print(Node->getFirstChild()); } - return; + return nullptr; case Node::Kind::PartialApplyObjCForwarder: if (Options.ShortenPartialApply) Printer << "partial apply"; else Printer << "partial apply ObjC forwarder"; - if (pointer->hasChildren()) { + if (Node->hasChildren()) { Printer << " for "; - print(pointer->getFirstChild()); + print(Node->getFirstChild()); } - return; + return nullptr; case Node::Kind::FieldOffset: { - print(pointer->getChild(0)); // directness + print(Node->getChild(0)); // directness Printer << "field offset for "; - auto entity = pointer->getChild(1); - print(entity, /*asContext*/ false, - /*suppressType*/ !Options.DisplayTypeOfIVarFieldOffset); - return; + auto entity = Node->getChild(1); + print(entity, /*asContext*/ false); + return nullptr; } case Node::Kind::ReabstractionThunk: case Node::Kind::ReabstractionThunkHelper: { if (Options.ShortenThunk) { Printer << "thunk for "; - print(pointer->getChild(pointer->getNumChildren() - 2)); - return; + print(Node->getChild(Node->getNumChildren() - 2)); + return nullptr; } Printer << "reabstraction thunk "; - if (pointer->getKind() == Node::Kind::ReabstractionThunkHelper) + if (Node->getKind() == Node::Kind::ReabstractionThunkHelper) Printer << "helper "; - auto generics = getFirstChildOfKind(pointer, Node::Kind::DependentGenericSignature); - assert(pointer->getNumChildren() == 2 + unsigned(generics != nullptr)); + auto generics = getFirstChildOfKind(Node, Node::Kind::DependentGenericSignature); + assert(Node->getNumChildren() == 2 + unsigned(generics != nullptr)); if (generics) { print(generics); Printer << " "; } Printer << "from "; - print(pointer->getChild(pointer->getNumChildren() - 2)); + print(Node->getChild(Node->getNumChildren() - 2)); Printer << " to "; - print(pointer->getChild(pointer->getNumChildren() - 1)); - return; + print(Node->getChild(Node->getNumChildren() - 1)); + return nullptr; } case Node::Kind::GenericTypeMetadataPattern: Printer << "generic type metadata pattern for "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::Metaclass: Printer << "metaclass for "; - print(pointer->getFirstChild()); - return; + print(Node->getFirstChild()); + return nullptr; case Node::Kind::ProtocolDescriptor: Printer << "protocol descriptor for "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::FullTypeMetadata: Printer << "full type metadata for "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::TypeMetadata: Printer << "type metadata for "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::TypeMetadataAccessFunction: Printer << "type metadata accessor for "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::TypeMetadataLazyCache: Printer << "lazy cache variable for type metadata for "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::AssociatedTypeMetadataAccessor: Printer << "associated type metadata accessor for "; - print(pointer->getChild(1)); + print(Node->getChild(1)); Printer << " in "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::AssociatedTypeWitnessTableAccessor: Printer << "associated type witness table accessor for "; - print(pointer->getChild(1)); + print(Node->getChild(1)); Printer << " : "; - print(pointer->getChild(2)); + print(Node->getChild(2)); Printer << " in "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::NominalTypeDescriptor: Printer << "nominal type descriptor for "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::ValueWitness: - Printer << toString(ValueWitnessKind(pointer->getIndex())); + Printer << toString(ValueWitnessKind(Node->getIndex())); if (Options.ShortenValueWitness) Printer << " for "; else Printer << " value witness for "; - print(pointer->getFirstChild()); - return; + print(Node->getFirstChild()); + return nullptr; case Node::Kind::ValueWitnessTable: Printer << "value witness table for "; - print(pointer->getFirstChild()); - return; + print(Node->getFirstChild()); + return nullptr; case Node::Kind::WitnessTableOffset: Printer << "witness table offset for "; - print(pointer->getFirstChild()); - return; + print(Node->getFirstChild()); + return nullptr; case Node::Kind::BoundGenericClass: case Node::Kind::BoundGenericStructure: case Node::Kind::BoundGenericEnum: - printBoundGeneric(pointer); - return; + printBoundGeneric(Node); + return nullptr; case Node::Kind::DynamicSelf: Printer << "Self"; - return; + return nullptr; case Node::Kind::CFunctionPointer: { Printer << "@convention(c) "; - printFunctionType(pointer); - return; + printFunctionType(Node); + return nullptr; } case Node::Kind::ObjCBlock: { Printer << "@convention(block) "; - printFunctionType(pointer); - return; + printFunctionType(Node); + return nullptr; } case Node::Kind::SILBoxType: { Printer << "@box "; - NodePointer type = pointer->getChild(0); + NodePointer type = Node->getChild(0); print(type); - return; + return nullptr; } case Node::Kind::Metatype: { unsigned Idx = 0; - if (pointer->getNumChildren() == 2) { - NodePointer repr = pointer->getChild(Idx); + if (Node->getNumChildren() == 2) { + NodePointer repr = Node->getChild(Idx); print(repr); Printer << " "; Idx++; } - NodePointer type = pointer->getChild(Idx)->getChild(0); + NodePointer type = Node->getChild(Idx)->getChild(0); bool needs_parens = !isSimpleType(type); if (needs_parens) Printer << "("; @@ -1354,136 +1305,134 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType) } else { Printer << ".Type"; } - return; + return nullptr; } case Node::Kind::ExistentialMetatype: { unsigned Idx = 0; - if (pointer->getNumChildren() == 2) { - NodePointer repr = pointer->getChild(Idx); + if (Node->getNumChildren() == 2) { + NodePointer repr = Node->getChild(Idx); print(repr); Printer << " "; Idx++; } - NodePointer type = pointer->getChild(Idx); + NodePointer type = Node->getChild(Idx); print(type); Printer << ".Type"; - return; + return nullptr; } case Node::Kind::MetatypeRepresentation: { - Printer << pointer->getText(); - return; + Printer << Node->getText(); + return nullptr; } case Node::Kind::AssociatedTypeRef: - print(pointer->getChild(0)); - Printer << '.' << pointer->getChild(1)->getText(); - return; + print(Node->getChild(0)); + Printer << '.' << Node->getChild(1)->getText(); + return nullptr; case Node::Kind::ProtocolList: { - NodePointer type_list = pointer->getChild(0); + NodePointer type_list = Node->getChild(0); if (!type_list) - return; + return nullptr; if (type_list->getNumChildren() == 0) Printer << "Any"; else printChildren(type_list, " & "); - return; + return nullptr; } case Node::Kind::ProtocolListWithClass: { - if (pointer->getNumChildren() < 2) - return; - NodePointer protocols = pointer->getChild(0); - NodePointer superclass = pointer->getChild(1); + if (Node->getNumChildren() < 2) + return nullptr; + NodePointer protocols = Node->getChild(0); + NodePointer superclass = Node->getChild(1); print(superclass); Printer << " & "; printChildren(protocols, " & "); - return; + return nullptr; } case Node::Kind::AssociatedType: // Don't print for now. - return; + return nullptr; case Node::Kind::QualifiedArchetype: { if (Options.ShortenArchetype) { Printer << "(archetype)"; - return; + return nullptr; } - if (pointer->getNumChildren() < 2) - return; - NodePointer number = pointer->getChild(0); - NodePointer decl_ctx = pointer->getChild(1); + if (Node->getNumChildren() < 2) + return nullptr; + NodePointer number = Node->getChild(0); + NodePointer decl_ctx = Node->getChild(1); Printer << "(archetype " << number->getIndex() << " of "; print(decl_ctx); Printer << ")"; - return; + return nullptr; } case Node::Kind::OwningAddressor: - printEntity(true, true, ".owningAddressor"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "owningAddressor"); case Node::Kind::OwningMutableAddressor: - printEntity(true, true, ".owningMutableAddressor"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "owningMutableAddressor"); case Node::Kind::NativeOwningAddressor: - printEntity(true, true, ".nativeOwningAddressor"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "nativeOwningAddressor"); case Node::Kind::NativeOwningMutableAddressor: - printEntity(true, true, ".nativeOwningMutableAddressor"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "nativeOwningMutableAddressor"); case Node::Kind::NativePinningAddressor: - printEntity(true, true, ".nativePinningAddressor"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "nativePinningAddressor"); case Node::Kind::NativePinningMutableAddressor: - printEntity(true, true, ".nativePinningMutableAddressor"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "nativePinningMutableAddressor"); case Node::Kind::UnsafeAddressor: - printEntity(true, true, ".unsafeAddressor"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "unsafeAddressor"); case Node::Kind::UnsafeMutableAddressor: - printEntity(true, true, ".unsafeMutableAddressor"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "unsafeMutableAddressor"); case Node::Kind::GlobalGetter: - printEntity(true, true, ".getter"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "getter"); case Node::Kind::Getter: - printEntity(true, true, ".getter"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "getter"); case Node::Kind::Setter: - printEntity(true, true, ".setter"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "setter"); case Node::Kind::MaterializeForSet: - printEntity(true, true, ".materializeForSet"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "materializeForSet"); case Node::Kind::WillSet: - printEntity(true, true, ".willset"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "willset"); case Node::Kind::DidSet: - printEntity(true, true, ".didset"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::WithColon, + /*hasName*/true, "didset"); case Node::Kind::Allocator: - printEntity(false, true, - isClassType(pointer->getChild(0)) - ? "__allocating_init" : "init"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::FunctionStyle, + /*hasName*/false, isClassType(Node->getChild(0)) ? + "__allocating_init" : "init"); case Node::Kind::Constructor: - printEntity(false, true, "init"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::FunctionStyle, + /*hasName*/false, "init"); case Node::Kind::Destructor: - printEntity(false, false, "deinit"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::NoType, + /*hasName*/false, "deinit"); case Node::Kind::Deallocator: - printEntity(false, false, - isClassType(pointer->getChild(0)) - ? "__deallocating_deinit" : "deinit"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::NoType, + /*hasName*/false, isClassType(Node->getChild(0)) ? + "__deallocating_deinit" : "deinit"); case Node::Kind::IVarInitializer: - printEntity(false, false, "__ivar_initializer"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::NoType, + /*hasName*/false, "__ivar_initializer"); case Node::Kind::IVarDestroyer: - printEntity(false, false, "__ivar_destroyer"); - return; + return printEntity(Node, asPrefixContext, TypePrinting::NoType, + /*hasName*/false, "__ivar_destroyer"); case Node::Kind::ProtocolConformance: { - NodePointer child0 = pointer->getChild(0); - NodePointer child1 = pointer->getChild(1); - NodePointer child2 = pointer->getChild(2); - if (pointer->getNumChildren() == 4) { + NodePointer child0 = Node->getChild(0); + NodePointer child1 = Node->getChild(1); + NodePointer child2 = Node->getChild(2); + if (Node->getNumChildren() == 4) { // TODO: check if this is correct Printer << "property behavior storage of "; print(child2); @@ -1500,46 +1449,46 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType) print(child2); } } - return; + return nullptr; } case Node::Kind::TypeList: - printChildren(pointer); - return; + printChildren(Node); + return nullptr; case Node::Kind::ImplConvention: - Printer << pointer->getText(); - return; + Printer << Node->getText(); + return nullptr; case Node::Kind::ImplFunctionAttribute: - Printer << pointer->getText(); - return; + Printer << Node->getText(); + return nullptr; case Node::Kind::ImplErrorResult: Printer << "@error "; LLVM_FALLTHROUGH; case Node::Kind::ImplParameter: case Node::Kind::ImplResult: - printChildren(pointer, " "); - return; + printChildren(Node, " "); + return nullptr; case Node::Kind::ImplFunctionType: - printImplFunctionType(pointer); - return; + printImplFunctionType(Node); + return nullptr; case Node::Kind::ErrorType: Printer << ""; - return; + return nullptr; case Node::Kind::DependentPseudogenericSignature: case Node::Kind::DependentGenericSignature: { Printer << '<'; unsigned depth = 0; - unsigned numChildren = pointer->getNumChildren(); + unsigned numChildren = Node->getNumChildren(); for (; depth < numChildren - && pointer->getChild(depth)->getKind() + && Node->getChild(depth)->getKind() == Node::Kind::DependentGenericParamCount; ++depth) { if (depth != 0) Printer << "><"; - unsigned count = pointer->getChild(depth)->getIndex(); + unsigned count = Node->getChild(depth)->getIndex(); for (unsigned index = 0; index < count; ++index) { if (index != 0) Printer << ", "; @@ -1550,34 +1499,32 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType) } if (depth != numChildren) { - if (!Options.DisplayWhereClauses) { - Printer << " where ..."; - } else { + if (Options.DisplayWhereClauses) { Printer << " where "; for (unsigned i = depth; i < numChildren; ++i) { if (i > depth) Printer << ", "; - print(pointer->getChild(i)); + print(Node->getChild(i)); } } } Printer << '>'; - return; + return nullptr; } case Node::Kind::DependentGenericParamCount: printer_unreachable("should be printed as a child of a " "DependentGenericSignature"); case Node::Kind::DependentGenericConformanceRequirement: { - NodePointer type = pointer->getChild(0); - NodePointer reqt = pointer->getChild(1); + NodePointer type = Node->getChild(0); + NodePointer reqt = Node->getChild(1); print(type); Printer << ": "; print(reqt); - return; + return nullptr; } case Node::Kind::DependentGenericLayoutRequirement: { - NodePointer type = pointer->getChild(0); - NodePointer layout = pointer->getChild(1); + NodePointer type = Node->getChild(0); + NodePointer layout = Node->getChild(1); print(type); Printer << ": "; assert(layout->getKind() == Node::Kind::Identifier); @@ -1602,88 +1549,89 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType) name = "_TrivialAtMost"; } Printer << name; - if (pointer->getNumChildren() > 2) { + if (Node->getNumChildren() > 2) { Printer << "("; - print(pointer->getChild(2)); - if (pointer->getNumChildren() > 3) { + print(Node->getChild(2)); + if (Node->getNumChildren() > 3) { Printer << ", "; - print(pointer->getChild(3)); + print(Node->getChild(3)); } Printer << ")"; } - return; + return nullptr; } case Node::Kind::DependentGenericSameTypeRequirement: { - NodePointer fst = pointer->getChild(0); - NodePointer snd = pointer->getChild(1); + NodePointer fst = Node->getChild(0); + NodePointer snd = Node->getChild(1); print(fst); Printer << " == "; print(snd); - return; + return nullptr; } case Node::Kind::DependentGenericParamType: { - Printer << pointer->getText(); - return; + Printer << Node->getText(); + return nullptr; } case Node::Kind::DependentGenericType: { - NodePointer sig = pointer->getChild(0); - NodePointer depTy = pointer->getChild(1); + NodePointer sig = Node->getChild(0); + NodePointer depTy = Node->getChild(1); print(sig); - Printer << ' '; + if (needSpaceBeforeType(depTy)) + Printer << ' '; print(depTy); - return; + return nullptr; } case Node::Kind::DependentMemberType: { - NodePointer base = pointer->getChild(0); + NodePointer base = Node->getChild(0); print(base); Printer << '.'; - NodePointer assocTy = pointer->getChild(1); + NodePointer assocTy = Node->getChild(1); print(assocTy); - return; + return nullptr; } case Node::Kind::DependentAssociatedTypeRef: { - Printer << pointer->getText(); - return; + Printer << Node->getText(); + return nullptr; } case Node::Kind::ReflectionMetadataBuiltinDescriptor: Printer << "reflection metadata builtin descriptor "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::ReflectionMetadataFieldDescriptor: Printer << "reflection metadata field descriptor "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::ReflectionMetadataAssocTypeDescriptor: Printer << "reflection metadata associated type descriptor "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::ReflectionMetadataSuperclassDescriptor: Printer << "reflection metadata superclass descriptor "; - print(pointer->getChild(0)); - return; + print(Node->getChild(0)); + return nullptr; case Node::Kind::ThrowsAnnotation: Printer<< " throws "; - return; + return nullptr; case Node::Kind::EmptyList: Printer << " empty-list "; - return; + return nullptr; case Node::Kind::FirstElementMarker: Printer << " first-element-marker "; - return; + return nullptr; case Node::Kind::VariadicMarker: Printer << " variadic-marker "; - return; + return nullptr; case Node::Kind::SILBoxTypeWithLayout: { - assert(pointer->getNumChildren() == 1 || pointer->getNumChildren() == 3); - NodePointer layout = pointer->getChild(0); + assert(Node->getNumChildren() == 1 || Node->getNumChildren() == 3); + NodePointer layout = Node->getChild(0); assert(layout->getKind() == Node::Kind::SILBoxLayout); NodePointer signature, genericArgs = nullptr; - if (pointer->getNumChildren() == 3) { - signature = pointer->getChild(1); + if (Node->getNumChildren() == 3) { + signature = Node->getChild(1); assert(signature->getKind() == Node::Kind::DependentGenericSignature); - genericArgs = pointer->getChild(2); + genericArgs = Node->getChild(2); assert(genericArgs->getKind() == Node::Kind::TypeList); print(signature); @@ -1699,31 +1647,126 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType) } Printer << '>'; } - return; + return nullptr; } case Node::Kind::SILBoxLayout: Printer << '{'; - for (unsigned i = 0; i < pointer->getNumChildren(); ++i) { + for (unsigned i = 0; i < Node->getNumChildren(); ++i) { if (i > 0) Printer << ','; Printer << ' '; - print(pointer->getChild(i)); + print(Node->getChild(i)); } Printer << " }"; - return; + return nullptr; case Node::Kind::SILBoxImmutableField: case Node::Kind::SILBoxMutableField: - Printer << (pointer->getKind() == Node::Kind::SILBoxImmutableField + Printer << (Node->getKind() == Node::Kind::SILBoxImmutableField ? "let " : "var "); - assert(pointer->getNumChildren() == 1 - && pointer->getChild(0)->getKind() == Node::Kind::Type); - print(pointer->getChild(0)); - return; + assert(Node->getNumChildren() == 1 + && Node->getChild(0)->getKind() == Node::Kind::Type); + print(Node->getChild(0)); + return nullptr; } printer_unreachable("bad node kind!"); } +NodePointer NodePrinter:: +printEntity(NodePointer Entity, bool asPrefixContext, TypePrinting TypePr, + bool hasName, StringRef ExtraName, int ExtraIndex) { + // Either we print the context in prefix form "." or in + // suffix form " in ". + bool MultiWordName = ExtraName.contains(' '); + // Also a local name (e.g. Mystruct #1) does not look good if its context is + // printed in prefix form. + if (hasName && + Entity->getChild(1)->getKind() == Node::Kind::LocalDeclName) + MultiWordName = true; + + if (asPrefixContext && (TypePr != TypePrinting::NoType || MultiWordName)) { + // If the context has a type to be printed, we can't use the prefix form. + return Entity; + } + + NodePointer PostfixContext = nullptr; + NodePointer Context = Entity->getChild(0); + if (printContext(Context)) { + if (MultiWordName) { + // If the name contains some spaces we don't print the context now but + // later in suffix form. + PostfixContext = Context; + } else { + size_t CurrentPos = Printer.getStringRef().size(); + PostfixContext = print(Context, /*asPrefixContext*/true); + + // Was the context printed as prefix? + if (Printer.getStringRef().size() != CurrentPos) + Printer << '.'; + } + } + + if (hasName) { + assert(ExtraIndex < 0 && "Can't have a name and extra index"); + if (!ExtraName.empty() && MultiWordName) { + Printer << ExtraName; + Printer << " of "; + ExtraName = ""; + } + print(Entity->getChild(1)); + if (!ExtraName.empty()) + Printer << '.'; + } + if (!ExtraName.empty()) { + Printer << ExtraName; + if (ExtraIndex >= 0) + Printer << ExtraIndex; + } + if (TypePr != TypePrinting::NoType) { + NodePointer type = Entity->getChild(1); + if (type->getKind() != Node::Kind::Type) + type = Entity->getChild(2); + assert(type->getKind() == Node::Kind::Type); + type = type->getChild(0); + if (TypePr == TypePrinting::FunctionStyle) { + // We expect to see a function type here, but if we don't, use the colon. + NodePointer t = type; + while (t->getKind() == Node::Kind::DependentGenericType) + t = t->getChild(1)->getChild(0); + if (t->getKind() != Node::Kind::FunctionType && + t->getKind() != Node::Kind::UncurriedFunctionType && + t->getKind() != Node::Kind::CFunctionPointer && + t->getKind() != Node::Kind::ThinFunctionType) { + TypePr = TypePrinting::WithColon; + } + } + if (TypePr == TypePrinting::WithColon) { + if (Options.DisplayEntityTypes) { + Printer << " : "; + print(type); + } + } else { + assert(TypePr == TypePrinting::FunctionStyle); + if (MultiWordName || needSpaceBeforeType(type)) + Printer << ' '; + + print(type); + } + } + if (!asPrefixContext && PostfixContext) { + // Print any left over context which couldn't be printed in prefix form. + if (Entity->getKind() == Node::Kind::DefaultArgumentInitializer || + Entity->getKind() == Node::Kind::Initializer) { + Printer << " of "; + } else { + Printer << " in "; + } + print(PostfixContext); + PostfixContext = nullptr; + } + return PostfixContext; +}; + std::string Demangle::nodeToString(NodePointer root, const DemangleOptions &options) { if (!root) diff --git a/test/ClangImporter/macro_literals.swift b/test/ClangImporter/macro_literals.swift index 1e818f1a820ae..7f5f0860a646d 100644 --- a/test/ClangImporter/macro_literals.swift +++ b/test/ClangImporter/macro_literals.swift @@ -2,7 +2,7 @@ import macros -// CHECK-LABEL: // testBitwiseOperations() -> () +// CHECK-LABEL: // testBitwiseOperations() func testBitwiseOperations() { // CHECK: %0 = integer_literal $Builtin.Int64, -1, loc {{.*}} // CHECK-NEXT: %1 = struct $UInt64 (%0 : $Builtin.Int64), loc {{.*}} @@ -43,7 +43,7 @@ func testBitwiseOperations() { _ = ATTR_UNDERLINE as CInt } -// CHECK-LABEL: // testIntegerArithmetic() -> () +// CHECK-LABEL: // testIntegerArithmetic() func testIntegerArithmetic() { // CHECK: %0 = integer_literal $Builtin.Int32, 0, loc {{.*}} @@ -114,7 +114,7 @@ func testIntegerArithmetic() { _ = DIVIDE_MIXED_TYPES as CLongLong } -// CHECK-LABEL: // testIntegerComparisons() -> () +// CHECK-LABEL: // testIntegerComparisons() func testIntegerComparisons() { // CHECK: %0 = integer_literal $Builtin.Int1, 0, loc {{.*}} @@ -154,7 +154,7 @@ func testIntegerComparisons() { _ = LTE_TRUE } -// CHECK-LABEL: // testLogicalComparisons() -> () +// CHECK-LABEL: // testLogicalComparisons() func testLogicalComparisons() { // CHECK: %0 = integer_literal $Builtin.Int1, -1, loc {{.*}} diff --git a/test/DebugInfo/linetable-do.swift b/test/DebugInfo/linetable-do.swift index 327435328b7dc..5104080b49114 100644 --- a/test/DebugInfo/linetable-do.swift +++ b/test/DebugInfo/linetable-do.swift @@ -8,7 +8,7 @@ func foo (_ a : Int64) throws -> Void { _blackHole(a) } -// CHECK-SIL: // main.testDoStmt () throws -> () +// CHECK-SIL: // main.testDoStmt() throws -> () func testDoStmt() throws -> Void { _blackHole(23) @@ -26,7 +26,7 @@ func testDoStmt() throws -> Void { try testDoStmt() -// CHECK-SIL: // main.testDoWhileStmt () -> () +// CHECK-SIL: // main.testDoWhileStmt() -> () func testDoWhileStmt() -> Void { // CHECK-NOT: !DILocation(line: [[@LINE+1]] do { diff --git a/test/Demangle/Inputs/manglings.txt b/test/Demangle/Inputs/manglings.txt index 160a945b751cd..3d3eff0a6406f 100644 --- a/test/Demangle/Inputs/manglings.txt +++ b/test/Demangle/Inputs/manglings.txt @@ -42,28 +42,28 @@ _TtTP3foo3barS_3bas_PS1__PS1_S_3zimS0___ ---> (foo.bar & foo.bas, foo.bas, foo.b _TtRSi ---> inout Swift.Int _TtTSiSu_ ---> (Swift.Int, Swift.UInt) _TttSiSu_ ---> (Swift.Int, Swift.UInt...) -_TtT3fooSi3barSu_ ---> (foo : Swift.Int, bar : Swift.UInt) -_TturFxx ---> (A) -> A -_TtuzrFT_T_ ---> <> () -> () -_Ttu__rFxqd__ ---> (A) -> A1 -_Ttu_z_rFxqd0__ ---> <> (A) -> A2 -_Ttu0_rFxq_ ---> (A) -> B -_TtuRxs8RunciblerFxwx5Mince ---> (A) -> A.Mince -_TtuRxle64xs8RunciblerFxwx5Mince ---> (A) -> A.Mince -_TtuRxlE64_16rFxwx5Mince ---> (A) -> A.Mince -_TtuRxlE64_32xs8RunciblerFxwx5Mince ---> (A) -> A.Mince -_TtuRxlM64_16rFxwx5Mince ---> (A) -> A.Mince -_TtuRxle64rFxwx5Mince ---> (A) -> A.Mince -_TtuRxlm64rFxwx5Mince ---> (A) -> A.Mince -_TtuRxlNrFxwx5Mince ---> (A) -> A.Mince -_TtuRxlRrFxwx5Mince ---> (A) -> A.Mince -_TtuRxlUrFxwx5Mince ---> (A) -> A.Mince -_TtuRxs8RunciblerFxWx5Mince6Quince_ ---> (A) -> A.Mince.Quince -_TtuRxs8Runciblexs8FungiblerFxwxPS_5Mince ---> (A) -> A.Mince -_TtuRxCs22AbstractRuncingFactoryrFxx ---> (A) -> A -_TtuRxs8Runciblewx5MincezxrFxx ---> (A) -> A -_TtuRxs8RuncibleWx5Mince6Quince_zxrFxx ---> (A) -> A -_Ttu0_Rxs8Runcible_S_wx5Minces8Fungiblew_S0_S1_rFxq_ ---> (A) -> B +_TtT3fooSi3barSu_ ---> (foo: Swift.Int, bar: Swift.UInt) +_TturFxx ---> (A) -> A +_TtuzrFT_T_ ---> <>() -> () +_Ttu__rFxqd__ ---> (A) -> A1 +_Ttu_z_rFxqd0__ ---> <>(A) -> A2 +_Ttu0_rFxq_ ---> (A) -> B +_TtuRxs8RunciblerFxwx5Mince ---> (A) -> A.Mince +_TtuRxle64xs8RunciblerFxwx5Mince ---> (A) -> A.Mince +_TtuRxlE64_16rFxwx5Mince ---> (A) -> A.Mince +_TtuRxlE64_32xs8RunciblerFxwx5Mince ---> (A) -> A.Mince +_TtuRxlM64_16rFxwx5Mince ---> (A) -> A.Mince +_TtuRxle64rFxwx5Mince ---> (A) -> A.Mince +_TtuRxlm64rFxwx5Mince ---> (A) -> A.Mince +_TtuRxlNrFxwx5Mince ---> (A) -> A.Mince +_TtuRxlRrFxwx5Mince ---> (A) -> A.Mince +_TtuRxlUrFxwx5Mince ---> (A) -> A.Mince +_TtuRxs8RunciblerFxWx5Mince6Quince_ ---> (A) -> A.Mince.Quince +_TtuRxs8Runciblexs8FungiblerFxwxPS_5Mince ---> (A) -> A.Mince +_TtuRxCs22AbstractRuncingFactoryrFxx ---> (A) -> A +_TtuRxs8Runciblewx5MincezxrFxx ---> (A) -> A +_TtuRxs8RuncibleWx5Mince6Quince_zxrFxx ---> (A) -> A +_Ttu0_Rxs8Runcible_S_wx5Minces8Fungiblew_S0_S1_rFxq_ ---> (A) -> B _Ttu0_Rx3Foo3BarxCS_3Bas_S0__S1_rT_ ---> () _Tv3foo3barSi ---> foo.bar : Swift.Int _TF3fooau3barSi ---> foo.bar.unsafeMutableAddressor : Swift.Int @@ -76,19 +76,19 @@ _TF3fooap3barSi ---> foo.bar.nativePinningMutableAddressor : Swift.Int _TF3foolp3barSi ---> foo.bar.nativePinningAddressor : Swift.Int _TF3foog3barSi ---> foo.bar.getter : Swift.Int _TF3foos3barSi ---> foo.bar.setter : Swift.Int -_TFC3foo3bar3basfT3zimCS_3zim_T_ ---> foo.bar.bas (zim : foo.zim) -> () -_TToFC3foo3bar3basfT3zimCS_3zim_T_ ---> {T:_TFC3foo3bar3basfT3zimCS_3zim_T_,C} @objc foo.bar.bas (zim : foo.zim) -> () -_TTOFSC3fooFTSdSd_Sd ---> {T:_TFSC3fooFTSdSd_Sd} @nonobjc __C.foo (Swift.Double, Swift.Double) -> Swift.Double -_T03foo3barC3basyAA3zimCAE_tFTo ---> {T:_T03foo3barC3basyAA3zimCAE_tF,C} @objc foo.bar.bas (zim : foo.zim) -> () -_T0SC3fooS2d_SdtFTO ---> {T:_T0SC3fooS2d_SdtF} @nonobjc __C.foo (Swift.Double, Swift.Double) -> Swift.Double -_S3foo3barC3basyAA3zimCAE_tFTo ---> {T:_S3foo3barC3basyAA3zimCAE_tF,C} @objc foo.bar.bas (zim : foo.zim) -> () -_SSC3fooS2d_SdtFTO ---> {T:_SSC3fooS2d_SdtF} @nonobjc __C.foo (Swift.Double, Swift.Double) -> Swift.Double -_TTDFC3foo3bar3basfT3zimCS_3zim_T_ ---> dynamic foo.bar.bas (zim : foo.zim) -> () -_TFC3foo3bar3basfT3zimCS_3zim_T_ ---> foo.bar.bas (zim : foo.zim) -> () -_TF3foooi1pFTCS_3barVS_3bas_OS_3zim ---> foo.+ infix (foo.bar, foo.bas) -> foo.zim -_TF3foooP1xFTCS_3barVS_3bas_OS_3zim ---> foo.^ postfix (foo.bar, foo.bas) -> foo.zim -_TFC3foo3barCfT_S0_ ---> foo.bar.__allocating_init () -> foo.bar -_TFC3foo3barcfT_S0_ ---> foo.bar.init () -> foo.bar +_TFC3foo3bar3basfT3zimCS_3zim_T_ ---> foo.bar.bas(zim: foo.zim) -> () +_TToFC3foo3bar3basfT3zimCS_3zim_T_ ---> {T:_TFC3foo3bar3basfT3zimCS_3zim_T_,C} @objc foo.bar.bas(zim: foo.zim) -> () +_TTOFSC3fooFTSdSd_Sd ---> {T:_TFSC3fooFTSdSd_Sd} @nonobjc __C.foo(Swift.Double, Swift.Double) -> Swift.Double +_T03foo3barC3basyAA3zimCAE_tFTo ---> {T:_T03foo3barC3basyAA3zimCAE_tF,C} @objc foo.bar.bas(zim: foo.zim) -> () +_T0SC3fooS2d_SdtFTO ---> {T:_T0SC3fooS2d_SdtF} @nonobjc __C.foo(Swift.Double, Swift.Double) -> Swift.Double +_S3foo3barC3basyAA3zimCAE_tFTo ---> {T:_S3foo3barC3basyAA3zimCAE_tF,C} @objc foo.bar.bas(zim: foo.zim) -> () +_SSC3fooS2d_SdtFTO ---> {T:_SSC3fooS2d_SdtF} @nonobjc __C.foo(Swift.Double, Swift.Double) -> Swift.Double +_TTDFC3foo3bar3basfT3zimCS_3zim_T_ ---> dynamic foo.bar.bas(zim: foo.zim) -> () +_TFC3foo3bar3basfT3zimCS_3zim_T_ ---> foo.bar.bas(zim: foo.zim) -> () +_TF3foooi1pFTCS_3barVS_3bas_OS_3zim ---> foo.+ infix(foo.bar, foo.bas) -> foo.zim +_TF3foooP1xFTCS_3barVS_3bas_OS_3zim ---> foo.^ postfix(foo.bar, foo.bas) -> foo.zim +_TFC3foo3barCfT_S0_ ---> foo.bar.__allocating_init() -> foo.bar +_TFC3foo3barcfT_S0_ ---> foo.bar.init() -> foo.bar _TFC3foo3barD ---> foo.bar.__deallocating_deinit _TFC3foo3bard ---> foo.bar.deinit _TMPC3foo3bar ---> generic type metadata pattern for foo.bar @@ -110,7 +110,7 @@ _TwTkC3foo3bar ---> {C} initializeBufferWithTake value witness for foo.bar _TwtkC3foo3bar ---> {C} initializeWithTake value witness for foo.bar _TwprC3foo3bar ---> {C} projectBuffer value witness for foo.bar _TWVC3foo3bar ---> value witness table for foo.bar -_TWoFC3foo3bar3basFSiSi ---> witness table offset for foo.bar.bas (Swift.Int) -> Swift.Int +_TWoFC3foo3bar3basFSiSi ---> witness table offset for foo.bar.bas(Swift.Int) -> Swift.Int _TWvdvC3foo3bar3basSi ---> direct field offset for foo.bar.bas : Swift.Int _TWvivC3foo3bar3basSi ---> indirect field offset for foo.bar.bas : Swift.Int _TWPC3foo3barS_8barrables ---> protocol witness table for foo.bar : foo.barrable in Swift @@ -122,10 +122,10 @@ _TWIC3foo3barS_8barrableS_ ---> {C} instantiation function for generic protocol _TWtC3foo3barS_8barrableS_4fred ---> {C} associated type metadata accessor for fred in foo.bar : foo.barrable in foo _TWTC3foo3barS_8barrableS_4fredS_6thomas ---> {C} associated type witness table accessor for fred : foo.thomas in foo.bar : foo.barrable in foo _TFSCg5greenVSC5Color ---> __C.green.getter : __C.Color -_TIF1t1fFT1iSi1sSS_T_A_ ---> t.(f (i : Swift.Int, s : Swift.String) -> ()).(default argument 0) -_TIF1t1fFT1iSi1sSS_T_A0_ ---> t.(f (i : Swift.Int, s : Swift.String) -> ()).(default argument 1) -_TFSqcfT_GSqx_ ---> Swift.Optional.init () -> A? -_TF21class_bound_protocols32class_bound_protocol_compositionFT1xPS_10ClassBoundS_13NotClassBound__PS0_S1__ ---> class_bound_protocols.class_bound_protocol_composition (x : class_bound_protocols.ClassBound & class_bound_protocols.NotClassBound) -> class_bound_protocols.ClassBound & class_bound_protocols.NotClassBound +_TIF1t1fFT1iSi1sSS_T_A_ ---> default argument 0 of t.f(i: Swift.Int, s: Swift.String) -> () +_TIF1t1fFT1iSi1sSS_T_A0_ ---> default argument 1 of t.f(i: Swift.Int, s: Swift.String) -> () +_TFSqcfT_GSqx_ ---> Swift.Optional.init() -> A? +_TF21class_bound_protocols32class_bound_protocol_compositionFT1xPS_10ClassBoundS_13NotClassBound__PS0_S1__ ---> class_bound_protocols.class_bound_protocol_composition(x: class_bound_protocols.ClassBound & class_bound_protocols.NotClassBound) -> class_bound_protocols.ClassBound & class_bound_protocols.NotClassBound _TtZZ ---> _TtZZ _TtB ---> _TtB _TtBSi ---> _TtBSi @@ -155,7 +155,7 @@ _TWvd ---> _TWvd _TWvi ---> _TWvi _TWvx ---> _TWvx _TtVCC4main3Foo4Ding3Str ---> main.Foo.Ding.Str -_TFVCC6nested6AClass12AnotherClass7AStruct9aFunctionfT1aSi_S2_ ---> nested.AClass.AnotherClass.AStruct.aFunction (a : Swift.Int) -> nested.AClass.AnotherClass.AStruct +_TFVCC6nested6AClass12AnotherClass7AStruct9aFunctionfT1aSi_S2_ ---> nested.AClass.AnotherClass.AStruct.aFunction(a: Swift.Int) -> nested.AClass.AnotherClass.AStruct _TtXwC10attributes10SwiftClass ---> weak attributes.SwiftClass _TtXoC10attributes10SwiftClass ---> unowned attributes.SwiftClass _TtERR ---> @@ -166,19 +166,19 @@ _Ttas3Int ---> Swift.Int _TTRXFo_dSc_dSb_XFo_iSc_iSb_ ---> reabstraction thunk helper from @callee_owned (@unowned Swift.UnicodeScalar) -> (@unowned Swift.Bool) to @callee_owned (@in Swift.UnicodeScalar) -> (@out Swift.Bool) _TTRXFo_dSi_dGSqSi__XFo_iSi_iGSqSi__ ---> reabstraction thunk helper from @callee_owned (@unowned Swift.Int) -> (@unowned Swift.Int?) to @callee_owned (@in Swift.Int) -> (@out Swift.Int?) _TTRGrXFo_iV18switch_abstraction1A_ix_XFo_dS0__ix_ ---> reabstraction thunk helper from @callee_owned (@in switch_abstraction.A) -> (@out A) to @callee_owned (@unowned switch_abstraction.A) -> (@out A) -_TFCF5types1gFT1bSb_T_L0_10Collection3zimfT_T_ ---> types.(g (b : Swift.Bool) -> ()).(Collection #2).zim () -> () -_TFF17capture_promotion22test_capture_promotionFT_FT_SiU_FT_Si_promote0 ---> capture_promotion.(test_capture_promotion () -> () -> Swift.Int).(closure #1) with unmangled suffix "_promote0" -_TFIVs8_Processi10_argumentsGSaSS_U_FT_GSaSS_ ---> Swift._Process.(variable initialization expression)._arguments : [Swift.String] with unmangled suffix "U_FT_GSaSS_" -_TFIvVs8_Process10_argumentsGSaSS_iU_FT_GSaSS_ ---> Swift._Process.(_arguments : [Swift.String]).(variable initialization expression).(closure #1) +_TFCF5types1gFT1bSb_T_L0_10Collection3zimfT_T_ ---> zim() -> () in Collection #2 in types.g(b: Swift.Bool) -> () +_TFF17capture_promotion22test_capture_promotionFT_FT_SiU_FT_Si_promote0 ---> closure #1 () -> Swift.Int in capture_promotion.test_capture_promotion() -> () -> Swift.Int with unmangled suffix "_promote0" +_TFIVs8_Processi10_argumentsGSaSS_U_FT_GSaSS_ ---> _arguments : [Swift.String] in variable initialization expression of Swift._Process with unmangled suffix "U_FT_GSaSS_" +_TFIvVs8_Process10_argumentsGSaSS_iU_FT_GSaSS_ ---> closure #1 () -> [Swift.String] in variable initialization expression of Swift._Process._arguments : [Swift.String] _TFCSo1AE ---> __ObjC.A.__ivar_destroyer _TFCSo1Ae ---> __ObjC.A.__ivar_initializer -_TTWC13call_protocol1CS_1PS_FS1_3foofT_Si ---> protocol witness for call_protocol.P.foo () -> Swift.Int in conformance call_protocol.C : call_protocol.P in call_protocol -_TFC12dynamic_self1X1ffT_DS0_ ---> dynamic_self.X.f () -> Self -_TTSg5Si___TFSqcfT_GSqx_ ---> generic specialization of Swift.Optional.init () -> A? -_TTSgq5Si___TFSqcfT_GSqx_ ---> generic specialization of Swift.Optional.init () -> A? -_TTSg5SiSis3Foos_Sf___TFSqcfT_GSqx_ ---> generic specialization of Swift.Optional.init () -> A? -_TTSg5Si_Sf___TFSqcfT_GSqx_ ---> generic specialization of Swift.Optional.init () -> A? -_TTSg5Si_Sf___TFSqcfT_GSqx_ ---> generic specialization of Swift.Optional.init () -> A? +_TTWC13call_protocol1CS_1PS_FS1_3foofT_Si ---> protocol witness for call_protocol.P.foo() -> Swift.Int in conformance call_protocol.C : call_protocol.P in call_protocol +_TFC12dynamic_self1X1ffT_DS0_ ---> dynamic_self.X.f() -> Self +_TTSg5Si___TFSqcfT_GSqx_ ---> generic specialization of Swift.Optional.init() -> A? +_TTSgq5Si___TFSqcfT_GSqx_ ---> generic specialization of Swift.Optional.init() -> A? +_TTSg5SiSis3Foos_Sf___TFSqcfT_GSqx_ ---> generic specialization of Swift.Optional.init() -> A? +_TTSg5Si_Sf___TFSqcfT_GSqx_ ---> generic specialization of Swift.Optional.init() -> A? +_TTSg5Si_Sf___TFSqcfT_GSqx_ ---> generic specialization of Swift.Optional.init() -> A? _TTSgS ---> _TTSgS _TTSg5S ---> _TTSg5S _TTSgSi ---> _TTSgSi @@ -187,67 +187,67 @@ _TTSgSi_ ---> _TTSgSi_ _TTSgSi__ ---> _TTSgSi__ _TTSgSiS_ ---> _TTSgSiS_ _TTSgSi__xyz ---> _TTSgSi__xyz -_TTSr5Si___TF4test7genericurFxx ---> generic not re-abstracted specialization of test.generic (A) -> A -_TTSrq5Si___TF4test7genericurFxx ---> generic not re-abstracted specialization of test.generic (A) -> A +_TTSr5Si___TF4test7genericurFxx ---> generic not re-abstracted specialization of test.generic(A) -> A +_TTSrq5Si___TF4test7genericurFxx ---> generic not re-abstracted specialization of test.generic(A) -> A _TPA__TTRXFo_oSSoSS_dSb_XFo_iSSiSS_dSb_ ---> {T:_TTRXFo_oSSoSS_dSb_XFo_iSSiSS_dSb_} partial apply forwarder for reabstraction thunk helper from @callee_owned (@owned Swift.String, @owned Swift.String) -> (@unowned Swift.Bool) to @callee_owned (@in Swift.String, @in Swift.String) -> (@unowned Swift.Bool) _TPAo__TTRGrXFo_dGSPx__dGSPx_zoPs5Error__XFo_iGSPx__iGSPx_zoPS___ ---> {T:_TTRGrXFo_dGSPx__dGSPx_zoPs5Error__XFo_iGSPx__iGSPx_zoPS___} partial apply ObjC forwarder for reabstraction thunk helper from @callee_owned (@unowned Swift.UnsafePointer) -> (@unowned Swift.UnsafePointer, @error @owned Swift.Error) to @callee_owned (@in Swift.UnsafePointer) -> (@out Swift.UnsafePointer, @error @owned Swift.Error) _T0S2SSbIxxxd_S2SSbIxiid_TRTA ---> {T:_T0S2SSbIxxxd_S2SSbIxiid_TR} partial apply forwarder for reabstraction thunk helper from @callee_owned (@owned Swift.String, @owned Swift.String) -> (@unowned Swift.Bool) to @callee_owned (@in Swift.String, @in Swift.String) -> (@unowned Swift.Bool) _T0SPyxGAAs5Error_pIxydzo_A2AsAB_pIxirzo_lTRTa ---> {T:_T0SPyxGAAs5Error_pIxydzo_A2AsAB_pIxirzo_lTR} partial apply ObjC forwarder for reabstraction thunk helper from @callee_owned (@unowned Swift.UnsafePointer) -> (@unowned Swift.UnsafePointer, @error @owned Swift.Error) to @callee_owned (@in Swift.UnsafePointer) -> (@out Swift.UnsafePointer, @error @owned Swift.Error) -_TiC4Meow5MyCls9subscriptFT1iSi_Sf ---> Meow.MyCls.subscript (i : Swift.Int) -> Swift.Float -_TF8manglingX22egbpdajGbuEbxfgehfvwxnFT_T_ ---> mangling.ليهمابتكلموشعربي؟ () -> () -_TF8manglingX24ihqwcrbEcvIaIdqgAFGpqjyeFT_T_ ---> mangling.他们为什么不说中文 () -> () -_TF8manglingX27ihqwctvzcJBfGFJdrssDxIboAybFT_T_ ---> mangling.他們爲什麽不說中文 () -> () -_TF8manglingX30Proprostnemluvesky_uybCEdmaEBaFT_T_ ---> mangling.Pročprostěnemluvíčesky () -> () -_TF8manglingXoi7p_qcaDcFTSiSi_Si ---> mangling.«+» infix (Swift.Int, Swift.Int) -> Swift.Int -_TF8manglingoi2qqFTSiSi_T_ ---> mangling.?? infix (Swift.Int, Swift.Int) -> () -_TFE11ext_structAV11def_structA1A4testfT_T_ ---> (extension in ext_structA):def_structA.A.test () -> () -_TF13devirt_accessP5_DISC15getPrivateClassFT_CS_P5_DISC12PrivateClass ---> devirt_access.(getPrivateClass in _DISC) () -> devirt_access.(PrivateClass in _DISC) -_TF4mainP5_mainX3wxaFT_T_ ---> main.(λ in _main) () -> () -_TF4mainP5_main3abcFT_aS_P5_DISC3xyz ---> main.(abc in _main) () -> main.(xyz in _DISC) +_TiC4Meow5MyCls9subscriptFT1iSi_Sf ---> Meow.MyCls.subscript(i: Swift.Int) -> Swift.Float +_TF8manglingX22egbpdajGbuEbxfgehfvwxnFT_T_ ---> mangling.ليهمابتكلموشعربي؟() -> () +_TF8manglingX24ihqwcrbEcvIaIdqgAFGpqjyeFT_T_ ---> mangling.他们为什么不说中文() -> () +_TF8manglingX27ihqwctvzcJBfGFJdrssDxIboAybFT_T_ ---> mangling.他們爲什麽不說中文() -> () +_TF8manglingX30Proprostnemluvesky_uybCEdmaEBaFT_T_ ---> mangling.Pročprostěnemluvíčesky() -> () +_TF8manglingXoi7p_qcaDcFTSiSi_Si ---> mangling.«+» infix(Swift.Int, Swift.Int) -> Swift.Int +_TF8manglingoi2qqFTSiSi_T_ ---> mangling.?? infix(Swift.Int, Swift.Int) -> () +_TFE11ext_structAV11def_structA1A4testfT_T_ ---> (extension in ext_structA):def_structA.A.test() -> () +_TF13devirt_accessP5_DISC15getPrivateClassFT_CS_P5_DISC12PrivateClass ---> devirt_access.(getPrivateClass in _DISC)() -> devirt_access.(PrivateClass in _DISC) +_TF4mainP5_mainX3wxaFT_T_ ---> main.(λ in _main)() -> () +_TF4mainP5_main3abcFT_aS_P5_DISC3xyz ---> main.(abc in _main)() -> main.(xyz in _DISC) _TtPMP_ ---> Any.Type -_TFCs13_NSSwiftArray29canStoreElementsOfDynamicTypefPMP_Sb ---> Swift._NSSwiftArray.canStoreElementsOfDynamicType (Any.Type) -> Swift.Bool +_TFCs13_NSSwiftArray29canStoreElementsOfDynamicTypefPMP_Sb ---> Swift._NSSwiftArray.canStoreElementsOfDynamicType(Any.Type) -> Swift.Bool _TFCs13_NSSwiftArrayg17staticElementTypePMP_ ---> Swift._NSSwiftArray.staticElementType.getter : Any.Type _TFCs17_DictionaryMirrorg9valueTypePMP_ ---> Swift._DictionaryMirror.valueType.getter : Any.Type -_TTSf1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> function signature specialization ()).(closure #1), Argument Types : [Swift.Int]> of specgen.take_closure ((Swift.Int, Swift.Int) -> ()) -> () -_TTSfq1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> function signature specialization ()).(closure #1), Argument Types : [Swift.Int]> of specgen.take_closure ((Swift.Int, Swift.Int) -> ()) -> () -_TTSf1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TTSg5Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> function signature specialization ()).(closure #1), Argument Types : [Swift.Int]> of generic specialization of specgen.take_closure ((Swift.Int, Swift.Int) -> ()) -> () -_TTSg5Si___TTSf1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> generic specialization of function signature specialization ()).(closure #1), Argument Types : [Swift.Int]> of specgen.take_closure ((Swift.Int, Swift.Int) -> ()) -> () -_TTSf1cpfr24_TF8capturep6helperFSiT__n___TTRXFo_dSi_dT__XFo_iSi_dT__ ---> function signature specialization ()]> of reabstraction thunk helper from @callee_owned (@unowned Swift.Int) -> (@unowned ()) to @callee_owned (@in Swift.Int) -> (@unowned ()) -_TTSf1cpfr24_TF8capturep6helperFSiT__n___TTRXFo_dSi_DT__XFo_iSi_DT__ ---> function signature specialization ()]> of reabstraction thunk helper from @callee_owned (@unowned Swift.Int) -> (@unowned_inner_pointer ()) to @callee_owned (@in Swift.Int) -> (@unowned_inner_pointer ()) -_TTSf1cpi0_cpfl0_cpse0v4u123_cpg53globalinit_33_06E7F1D906492AE070936A9B58CBAE1C_token8_cpfr36_TFtest_capture_propagation2_closure___TF7specgen12take_closureFFTSiSi_T_T_ ---> function signature specialization of specgen.take_closure ((Swift.Int, Swift.Int) -> ()) -> () -_TTSf0gs___TFVs11_StringCore15_invariantCheckfT_T_ ---> function signature specialization of Swift._StringCore._invariantCheck () -> () -_TTSf2g___TTSf2s_d___TFVs11_StringCoreCfVs13_StringBufferS_ ---> function signature specialization of function signature specialization of Swift._StringCore.init (Swift._StringBuffer) -> Swift._StringCore -_TTSf2dg___TTSf2s_d___TFVs11_StringCoreCfVs13_StringBufferS_ ---> function signature specialization of function signature specialization of Swift._StringCore.init (Swift._StringBuffer) -> Swift._StringCore -_TTSf2dgs___TTSf2s_d___TFVs11_StringCoreCfVs13_StringBufferS_ ---> function signature specialization of function signature specialization of Swift._StringCore.init (Swift._StringBuffer) -> Swift._StringCore -_TTSf3d_i_d_i_d_i___TFVs11_StringCoreCfVs13_StringBufferS_ ---> function signature specialization of Swift._StringCore.init (Swift._StringBuffer) -> Swift._StringCore -_TTSf3d_i_n_i_d_i___TFVs11_StringCoreCfVs13_StringBufferS_ ---> function signature specialization of Swift._StringCore.init (Swift._StringBuffer) -> Swift._StringCore -_TFIZvV8mangling10HasVarInit5stateSbiu_KT_Sb ---> static mangling.HasVarInit.(state : Swift.Bool).(variable initialization expression).(implicit closure #1) -_TFFV23interface_type_mangling18GenericTypeContext23closureInGenericContexturFqd__T_L_3fooFTqd__x_T_ ---> interface_type_mangling.GenericTypeContext.(closureInGenericContext (A1) -> ()).(foo #1) (A1, A) -> () -_TFFV23interface_type_mangling18GenericTypeContextg31closureInGenericPropertyContextxL_3fooFT_x ---> interface_type_mangling.GenericTypeContext.(closureInGenericPropertyContext.getter : A).(foo #1) () -> A -_TTWurGV23interface_type_mangling18GenericTypeContextx_S_18GenericWitnessTestS_FS1_23closureInGenericContextuRxS1_rfqd__T_ ---> protocol witness for interface_type_mangling.GenericWitnessTest.closureInGenericContext (A1) -> () in conformance interface_type_mangling.GenericTypeContext : interface_type_mangling.GenericWitnessTest in interface_type_mangling +_TTSf1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> function signature specialization () in specgen.caller(Swift.Int) -> (), Argument Types : [Swift.Int]> of specgen.take_closure((Swift.Int, Swift.Int) -> ()) -> () +_TTSfq1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> function signature specialization () in specgen.caller(Swift.Int) -> (), Argument Types : [Swift.Int]> of specgen.take_closure((Swift.Int, Swift.Int) -> ()) -> () +_TTSf1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TTSg5Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> function signature specialization () in specgen.caller(Swift.Int) -> (), Argument Types : [Swift.Int]> of generic specialization of specgen.take_closure((Swift.Int, Swift.Int) -> ()) -> () +_TTSg5Si___TTSf1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> generic specialization of function signature specialization () in specgen.caller(Swift.Int) -> (), Argument Types : [Swift.Int]> of specgen.take_closure((Swift.Int, Swift.Int) -> ()) -> () +_TTSf1cpfr24_TF8capturep6helperFSiT__n___TTRXFo_dSi_dT__XFo_iSi_dT__ ---> function signature specialization ()]> of reabstraction thunk helper from @callee_owned (@unowned Swift.Int) -> (@unowned ()) to @callee_owned (@in Swift.Int) -> (@unowned ()) +_TTSf1cpfr24_TF8capturep6helperFSiT__n___TTRXFo_dSi_DT__XFo_iSi_DT__ ---> function signature specialization ()]> of reabstraction thunk helper from @callee_owned (@unowned Swift.Int) -> (@unowned_inner_pointer ()) to @callee_owned (@in Swift.Int) -> (@unowned_inner_pointer ()) +_TTSf1cpi0_cpfl0_cpse0v4u123_cpg53globalinit_33_06E7F1D906492AE070936A9B58CBAE1C_token8_cpfr36_TFtest_capture_propagation2_closure___TF7specgen12take_closureFFTSiSi_T_T_ ---> function signature specialization of specgen.take_closure((Swift.Int, Swift.Int) -> ()) -> () +_TTSf0gs___TFVs11_StringCore15_invariantCheckfT_T_ ---> function signature specialization of Swift._StringCore._invariantCheck() -> () +_TTSf2g___TTSf2s_d___TFVs11_StringCoreCfVs13_StringBufferS_ ---> function signature specialization of function signature specialization of Swift._StringCore.init(Swift._StringBuffer) -> Swift._StringCore +_TTSf2dg___TTSf2s_d___TFVs11_StringCoreCfVs13_StringBufferS_ ---> function signature specialization of function signature specialization of Swift._StringCore.init(Swift._StringBuffer) -> Swift._StringCore +_TTSf2dgs___TTSf2s_d___TFVs11_StringCoreCfVs13_StringBufferS_ ---> function signature specialization of function signature specialization of Swift._StringCore.init(Swift._StringBuffer) -> Swift._StringCore +_TTSf3d_i_d_i_d_i___TFVs11_StringCoreCfVs13_StringBufferS_ ---> function signature specialization of Swift._StringCore.init(Swift._StringBuffer) -> Swift._StringCore +_TTSf3d_i_n_i_d_i___TFVs11_StringCoreCfVs13_StringBufferS_ ---> function signature specialization of Swift._StringCore.init(Swift._StringBuffer) -> Swift._StringCore +_TFIZvV8mangling10HasVarInit5stateSbiu_KT_Sb ---> implicit closure #1 : @autoclosure () -> Swift.Bool in variable initialization expression of static mangling.HasVarInit.state : Swift.Bool +_TFFV23interface_type_mangling18GenericTypeContext23closureInGenericContexturFqd__T_L_3fooFTqd__x_T_ ---> foo #1 (A1, A) -> () in interface_type_mangling.GenericTypeContext.closureInGenericContext(A1) -> () +_TFFV23interface_type_mangling18GenericTypeContextg31closureInGenericPropertyContextxL_3fooFT_x ---> foo #1 () -> A in interface_type_mangling.GenericTypeContext.closureInGenericPropertyContext.getter : A +_TTWurGV23interface_type_mangling18GenericTypeContextx_S_18GenericWitnessTestS_FS1_23closureInGenericContextuRxS1_rfqd__T_ ---> protocol witness for interface_type_mangling.GenericWitnessTest.closureInGenericContext(A1) -> () in conformance interface_type_mangling.GenericTypeContext : interface_type_mangling.GenericWitnessTest in interface_type_mangling _TTWurGV23interface_type_mangling18GenericTypeContextx_S_18GenericWitnessTestS_FS1_g31closureInGenericPropertyContextwx3Tee ---> protocol witness for interface_type_mangling.GenericWitnessTest.closureInGenericPropertyContext.getter : A.Tee in conformance interface_type_mangling.GenericTypeContext : interface_type_mangling.GenericWitnessTest in interface_type_mangling -_TTWurGV23interface_type_mangling18GenericTypeContextx_S_18GenericWitnessTestS_FS1_16twoParamsAtDepthu0_RxS1_rfTqd__1yqd_0__T_ ---> protocol witness for interface_type_mangling.GenericWitnessTest.twoParamsAtDepth (A1, y : B1) -> () in conformance interface_type_mangling.GenericTypeContext : interface_type_mangling.GenericWitnessTest in interface_type_mangling -_TFC3red11BaseClassEHcfzT1aSi_S0_ ---> red.BaseClassEH.init (a : Swift.Int) throws -> red.BaseClassEH +_TTWurGV23interface_type_mangling18GenericTypeContextx_S_18GenericWitnessTestS_FS1_16twoParamsAtDepthu0_RxS1_rfTqd__1yqd_0__T_ ---> protocol witness for interface_type_mangling.GenericWitnessTest.twoParamsAtDepth(A1, y: B1) -> () in conformance interface_type_mangling.GenericTypeContext : interface_type_mangling.GenericWitnessTest in interface_type_mangling +_TFC3red11BaseClassEHcfzT1aSi_S0_ ---> red.BaseClassEH.init(a: Swift.Int) throws -> red.BaseClassEH _TFe27mangling_generic_extensionsRxS_8RunciblerVS_3Foog1aSi ---> (extension in mangling_generic_extensions):mangling_generic_extensions.Foo.a.getter : Swift.Int _TFe27mangling_generic_extensionsRxS_8RunciblerVS_3Foog1bx ---> (extension in mangling_generic_extensions):mangling_generic_extensions.Foo.b.getter : A _TTRXFo_iT__iT_zoPs5Error__XFo__dT_zoPS___ ---> reabstraction thunk helper from @callee_owned (@in ()) -> (@out (), @error @owned Swift.Error) to @callee_owned () -> (@unowned (), @error @owned Swift.Error) _TFE1a ---> _TFE1a _TF21$__lldb_module_for_E0au3$E0Ps5Error_ ---> $__lldb_module_for_E0.$E0.unsafeMutableAddressor : Swift.Error _TMps10Comparable ---> protocol descriptor for Swift.Comparable -_TFC4testP33_83378C430F65473055F1BD53F3ADCDB71C5doFoofT_T_ ---> test.(C in _83378C430F65473055F1BD53F3ADCDB7).doFoo () -> () -_TFVV15nested_generics5Lunch6DinnerCfT11firstCoursex12secondCourseGSqqd___9leftoversx14transformationFxqd___GS1_x_qd___ ---> nested_generics.Lunch.Dinner.init (firstCourse : A, secondCourse : A1?, leftovers : A, transformation : (A) -> A1) -> nested_generics.Lunch.Dinner -_TFVFC15nested_generics7HotDogs11applyRelishFT_T_L_6RelishCfT8materialx_GS1_x_ ---> nested_generics.HotDogs.(applyRelish () -> ()).(Relish #1).init (material : A) -> nested_generics.HotDogs.(applyRelish () -> ()).(Relish #1) -_TFVFE15nested_genericsSS3fooFT_T_L_6CheeseCfT8materialx_GS0_x_ ---> (extension in nested_generics):Swift.String.(foo () -> ()).(Cheese #1).init (material : A) -> (extension in nested_generics):Swift.String.(foo () -> ()).(Cheese #1) +_TFC4testP33_83378C430F65473055F1BD53F3ADCDB71C5doFoofT_T_ ---> test.(C in _83378C430F65473055F1BD53F3ADCDB7).doFoo() -> () +_TFVV15nested_generics5Lunch6DinnerCfT11firstCoursex12secondCourseGSqqd___9leftoversx14transformationFxqd___GS1_x_qd___ ---> nested_generics.Lunch.Dinner.init(firstCourse: A, secondCourse: A1?, leftovers: A, transformation: (A) -> A1) -> nested_generics.Lunch.Dinner +_TFVFC15nested_generics7HotDogs11applyRelishFT_T_L_6RelishCfT8materialx_GS1_x_ ---> init(material: A) -> Relish #1 in nested_generics.HotDogs.applyRelish() -> () in Relish #1 in nested_generics.HotDogs.applyRelish() -> () +_TFVFE15nested_genericsSS3fooFT_T_L_6CheeseCfT8materialx_GS0_x_ ---> init(material: A) -> Cheese #1 in (extension in nested_generics):Swift.String.foo() -> () in Cheese #1 in (extension in nested_generics):Swift.String.foo() -> () _TTWOE5imojiCSo5Imoji14ImojiMatchRankS_9RankValueS_FS2_g9rankValueqq_Ss16RawRepresentable8RawValue ---> _TTWOE5imojiCSo5Imoji14ImojiMatchRankS_9RankValueS_FS2_g9rankValueqq_Ss16RawRepresentable8RawValue _TtFzas4VoidGC16FusionXBaseUtils6FutureQq_ZFVS_7Futures6futureurFFzT_GS0_x_GS0_x__ ---> _TtFzas4VoidGC16FusionXBaseUtils6FutureQq_ZFVS_7Futures6futureurFFzT_GS0_x_GS0_x__ -_T0s17MutableCollectionP1asAARzs012RandomAccessB0RzsAA11SubSequences013BidirectionalB0PRpzsAdHRQlE06rotatecD05Indexs01_A9IndexablePQzAM15shiftingToStart_tFAJs01_J4BasePQzAQcfU_ ---> (extension in a):Swift.MutableCollection.(rotateRandomAccess (shiftingToStart : A.Index) -> A.Index).(closure #1) +_T0s17MutableCollectionP1asAARzs012RandomAccessB0RzsAA11SubSequences013BidirectionalB0PRpzsAdHRQlE06rotatecD05Indexs01_A9IndexablePQzAM15shiftingToStart_tFAJs01_J4BasePQzAQcfU_ ---> closure #1 (A.Index) -> A.Index in (extension in a):Swift.MutableCollection.rotateRandomAccess(shiftingToStart: A.Index) -> A.Index _T03foo4_123ABTf3psbpsb_n ---> function signature specialization of foo -_T04main5innerys5Int32Vz_yADctF25closure_with_box_argumentxz_Bi32__lXXTf1nc_n ---> function signature specialization { var A } ]> of main.inner (inout Swift.Int32, (Swift.Int32) -> ()) -> () -_T03foo6testityyyc_yyctF1a1bTf3pfpf_n ---> function signature specialization of foo.testit (() -> (), () -> ()) -> () +_T04main5innerys5Int32Vz_yADctF25closure_with_box_argumentxz_Bi32__lXXTf1nc_n ---> function signature specialization { var A } ]> of main.inner(inout Swift.Int32, (Swift.Int32) -> ()) -> () +_T03foo6testityyyc_yyctF1a1bTf3pfpf_n ---> function signature specialization of foo.testit(() -> (), () -> ()) -> () _SocketJoinOrLeaveMulticast ---> _SocketJoinOrLeaveMulticast -_T0s10DictionaryV3t17E6Index2V1loiSbAEyxq__G_AGtFZ ---> static (extension in t17):Swift.Dictionary.Index2.< infix ((extension in t17):[A : B].Index2, (extension in t17):[A : B].Index2) -> Swift.Bool -_T08mangling14varargsVsArrayySaySiG3arrd_SS1ntF ---> mangling.varargsVsArray (arr : Swift.Int..., n : Swift.String) -> () -_T08mangling14varargsVsArrayySaySiG3arrd_tF ---> mangling.varargsVsArray (arr : Swift.Int...) -> () +_T0s10DictionaryV3t17E6Index2V1loiSbAEyxq__G_AGtFZ ---> static (extension in t17):Swift.Dictionary.Index2.< infix((extension in t17):[A : B].Index2, (extension in t17):[A : B].Index2) -> Swift.Bool +_T08mangling14varargsVsArrayySaySiG3arrd_SS1ntF ---> mangling.varargsVsArray(arr: Swift.Int..., n: Swift.String) -> () +_T08mangling14varargsVsArrayySaySiG3arrd_tF ---> mangling.varargsVsArray(arr: Swift.Int...) -> () _T0s13_UnicodeViewsVss22RandomAccessCollectionRzs0A8EncodingR_11SubSequence_5IndexQZAFRtzsAcERpzAE_AEQZAIRSs15UnsignedInteger8Iterator_7ElementRPzAE_AlMQZANRS13EncodedScalar_AlMQY_AORSr0_lE13CharacterViewVyxq__G ---> (extension in Swift):Swift._UnicodeViews.CharacterView -_T010Foundation11MeasurementV12SimulatorKitSo9UnitAngleCRszlE11OrientationO2eeoiSbAcDEAGOyAF_G_AKtFZ ---> static (extension in SimulatorKit):Foundation.Measurement.Orientation.== infix ((extension in SimulatorKit):Foundation.Measurement<__ObjC.UnitAngle>.Orientation, (extension in SimulatorKit):Foundation.Measurement<__ObjC.UnitAngle>.Orientation) -> Swift.Bool +_T010Foundation11MeasurementV12SimulatorKitSo9UnitAngleCRszlE11OrientationO2eeoiSbAcDEAGOyAF_G_AKtFZ ---> static (extension in SimulatorKit):Foundation.Measurement.Orientation.== infix((extension in SimulatorKit):Foundation.Measurement<__ObjC.UnitAngle>.Orientation, (extension in SimulatorKit):Foundation.Measurement<__ObjC.UnitAngle>.Orientation) -> Swift.Bool diff --git a/test/Demangle/Inputs/simplified-manglings.txt b/test/Demangle/Inputs/simplified-manglings.txt index 6eea81b469f74..e0e2a58af5495 100644 --- a/test/Demangle/Inputs/simplified-manglings.txt +++ b/test/Demangle/Inputs/simplified-manglings.txt @@ -27,13 +27,13 @@ _TtGVs10DictionarySSSi_ ---> [String : Int] _TtVs7CString ---> CString _TtCSo8NSObject ---> NSObject _TtO6Monads6Either ---> Either -_TtbSiSu ---> @convention(block) (Int) -> UInt -_TtcSiSu ---> @convention(c) (Int) -> UInt -_TtbTSiSc_Su ---> @convention(block) (Int, UnicodeScalar) -> UInt -_TtcTSiSc_Su ---> @convention(c) (Int, UnicodeScalar) -> UInt -_TtFSiSu ---> (Int) -> UInt -_TtKSiSu ---> @autoclosure (Int) -> UInt -_TtFSiFScSu ---> (Int) -> (UnicodeScalar) -> UInt +_TtbSiSu ---> @convention(block) (_:) +_TtcSiSu ---> @convention(c) (_:) +_TtbTSiSc_Su ---> @convention(block) (_:_:) +_TtcTSiSc_Su ---> @convention(c) (_:_:) +_TtFSiSu ---> (_:) +_TtKSiSu ---> @autoclosure (_:) +_TtFSiFScSu ---> (_:) _TtMSi ---> Int.Type _TtP_ ---> Any _TtP3foo3bar_ ---> bar @@ -42,15 +42,15 @@ _TtTP3foo3barS_3bas_PS1__PS1_S_3zimS0___ ---> (bar & bas, bas, bas & zim & bar) _TtRSi ---> inout Int _TtTSiSu_ ---> (Int, UInt) _TttSiSu_ ---> (Int, UInt...) -_TtT3fooSi3barSu_ ---> (foo : Int, bar : UInt) -_TturFxx ---> (A) -> A -_TtuzrFT_T_ ---> <> () -> () -_Ttu__rFxqd__ ---> (A) -> A1 -_Ttu_z_rFxqd0__ ---> <> (A) -> A2 -_Ttu0_rFxq_ ---> (A) -> B -_TtuR_s8RunciblerFxwx5Mince ---> (A) -> A.Mince -_TtuR_Cs22AbstractRuncingFactoryrFxx ---> (A) -> A -_TtuR_s8Runciblew_5MincezxrFxx ---> (A) -> A +_TtT3fooSi3barSu_ ---> (foo: Int, bar: UInt) +_TturFxx ---> (_:) +_TtuzrFT_T_ ---> <>() +_Ttu__rFxqd__ ---> (_:) +_Ttu_z_rFxqd0__ ---> <>(_:) +_Ttu0_rFxq_ ---> (_:) +_TtuR_s8RunciblerFxwx5Mince ---> (_:) +_TtuR_Cs22AbstractRuncingFactoryrFxx ---> (_:) +_TtuR_s8Runciblew_5MincezxrFxx ---> (_:) _Tv3foo3barSi ---> bar _TF3fooau3barSi ---> bar.unsafeMutableAddressor _TF3foolu3barSi ---> bar.unsafeAddressor @@ -62,14 +62,14 @@ _TF3fooap3barSi ---> bar.nativePinningMutableAddressor _TF3foolp3barSi ---> bar.nativePinningAddressor _TF3foog3barSi ---> bar.getter _TF3foos3barSi ---> bar.setter -_TFC3foo3bar3basfT3zimCS_3zim_T_ ---> bar.bas(zim : zim) -> () -_TToFC3foo3bar3basfT3zimCS_3zim_T_ ---> @objc bar.bas(zim : zim) -> () -_TTDFC3foo3bar3basfT3zimCS_3zim_T_ ---> dynamic bar.bas(zim : zim) -> () -_TFC3foo3bar3basfT3zimCS_3zim_T_ ---> bar.bas(zim : zim) -> () -_TF3foooi1pFTCS_3barVS_3bas_OS_3zim ---> + infix(bar, bas) -> zim -_TF3foooP1xFTCS_3barVS_3bas_OS_3zim ---> ^ postfix(bar, bas) -> zim -_TFC3foo3barCfT_S0_ ---> bar.__allocating_init() -> bar -_TFC3foo3barcfT_S0_ ---> bar.init() -> bar +_TFC3foo3bar3basfT3zimCS_3zim_T_ ---> bar.bas(zim:) +_TToFC3foo3bar3basfT3zimCS_3zim_T_ ---> @objc bar.bas(zim:) +_TTDFC3foo3bar3basfT3zimCS_3zim_T_ ---> dynamic bar.bas(zim:) +_TFC3foo3bar3basfT3zimCS_3zim_T_ ---> bar.bas(zim:) +_TF3foooi1pFTCS_3barVS_3bas_OS_3zim ---> + infix(_:_:) +_TF3foooP1xFTCS_3barVS_3bas_OS_3zim ---> ^ postfix(_:_:) +_TFC3foo3barCfT_S0_ ---> bar.__allocating_init() +_TFC3foo3barcfT_S0_ ---> bar.init() _TFC3foo3barD ---> bar.__deallocating_deinit _TFC3foo3bard ---> bar.deinit _TMPC3foo3bar ---> generic type metadata pattern for bar @@ -90,7 +90,7 @@ _TwTkC3foo3bar ---> initializeBufferWithTake for bar _TwtkC3foo3bar ---> initializeWithTake for bar _TwprC3foo3bar ---> projectBuffer for bar _TWVC3foo3bar ---> value witness table for bar -_TWoFC3foo3bar3basFSiSi ---> witness table offset for bar.bas(Int) -> Int +_TWoFC3foo3bar3basFSiSi ---> witness table offset for bar.bas(_:) _TWvdvC3foo3bar3basSi ---> direct field offset for bar.bas _TWvivC3foo3bar3basSi ---> indirect field offset for bar.bas _TWPC3foo3barS_8barrables ---> protocol witness table for bar @@ -100,10 +100,10 @@ _TWLC3foo3barS0_S_8barrableS_ ---> lazy protocol witness table cache variable fo _TWGC3foo3barS_8barrableS_ ---> generic protocol witness table for bar _TWIC3foo3barS_8barrableS_ ---> instantiation function for generic protocol witness table for bar _TFSCg5greenVSC5Color ---> green.getter -_TIF1t1fFT1iSi1sSS_T_A_ ---> (f(i : Int, s : String) -> ()).(default argument 0) -_TIF1t1fFT1iSi1sSS_T_A0_ ---> (f(i : Int, s : String) -> ()).(default argument 1) -_TFSqcfT_GSqx_ ---> Optional.init() -> A? -_TF21class_bound_protocols32class_bound_protocol_compositionFT1xPS_10ClassBoundS_13NotClassBound__PS0_S1__ ---> class_bound_protocol_composition(x : ClassBound & NotClassBound) -> ClassBound & NotClassBound +_TIF1t1fFT1iSi1sSS_T_A_ ---> default argument 0 of f(i:s:) +_TIF1t1fFT1iSi1sSS_T_A0_ ---> default argument 1 of f(i:s:) +_TFSqcfT_GSqx_ ---> Optional.init() +_TF21class_bound_protocols32class_bound_protocol_compositionFT1xPS_10ClassBoundS_13NotClassBound__PS0_S1__ ---> class_bound_protocol_composition(x:) _TtZZ ---> _TtZZ _TtB ---> _TtB _TtBSi ---> _TtBSi @@ -128,7 +128,7 @@ _TWvd ---> _TWvd _TWvi ---> _TWvi _TWvx ---> _TWvx _TtVCC4main3Foo4Ding3Str ---> Foo.Ding.Str -_TFVCC6nested6AClass12AnotherClass7AStruct9aFunctionfT1aSi_S2_ ---> AClass.AnotherClass.AStruct.aFunction(a : Int) -> AClass.AnotherClass.AStruct +_TFVCC6nested6AClass12AnotherClass7AStruct9aFunctionfT1aSi_S2_ ---> AClass.AnotherClass.AStruct.aFunction(a:) _TtXwC10attributes10SwiftClass ---> weak SwiftClass _TtXoC10attributes10SwiftClass ---> unowned SwiftClass _TtERR ---> @@ -139,17 +139,17 @@ _Ttas3Int ---> Int _TTRXFo_dSc_dSb_XFo_iSc_iSb_ ---> thunk for @callee_owned (@unowned UnicodeScalar) -> (@unowned Bool) _TTRXFo_dSi_dGSqSi__XFo_iSi_iGSqSi__ ---> thunk for @callee_owned (@unowned Int) -> (@unowned Int?) _TTRGrXFo_iV18switch_abstraction1A_ix_XFo_dS0__ix_ ---> thunk for @callee_owned (@in A) -> (@out A) -_TFCF5types1gFT1bSb_T_L0_10Collection3zimfT_T_ ---> (g(b : Bool) -> ()).(Collection #2).zim() -> () -_TFF17capture_promotion22test_capture_promotionFT_FT_SiU_FT_Si_promote0 ---> (test_capture_promotion() -> () -> Int).(closure #1) -_TFIVs8_Processi10_argumentsGSaSS_U_FT_GSaSS_ ---> _Process.(variable initialization expression)._arguments -_TFIvVs8_Process10_argumentsGSaSS_iU_FT_GSaSS_ ---> _Process.(_arguments).(variable initialization expression).(closure #1) +_TFCF5types1gFT1bSb_T_L0_10Collection3zimfT_T_ ---> zim() in Collection #2 in g(b:) +_TFF17capture_promotion22test_capture_promotionFT_FT_SiU_FT_Si_promote0 ---> closure #1 in test_capture_promotion() +_TFIVs8_Processi10_argumentsGSaSS_U_FT_GSaSS_ ---> _arguments in variable initialization expression of _Process +_TFIvVs8_Process10_argumentsGSaSS_iU_FT_GSaSS_ ---> closure #1 in variable initialization expression of _Process._arguments _TFCSo1AE ---> A.__ivar_destroyer _TFCSo1Ae ---> A.__ivar_initializer -_TTWC13call_protocol1CS_1PS_FS1_3foofT_Si ---> protocol witness for P.foo() -> Int in conformance C -_TTSg5Si___TFSqcfT_GSqx_ ---> specialized Optional.init() -> A? -_TTSg5SiSis3Foos_Sf___TFSqcfT_GSqx_ ---> specialized Optional.init() -> A? -_TTSg5Si_Sf___TFSqcfT_GSqx_ ---> specialized Optional.init() -> A? -_TTSg5Si_Sf___TFSqcfT_GSqx_ ---> specialized Optional.init() -> A? +_TTWC13call_protocol1CS_1PS_FS1_3foofT_Si ---> protocol witness for P.foo() in conformance C +_TTSg5Si___TFSqcfT_GSqx_ ---> specialized Optional.init() +_TTSg5SiSis3Foos_Sf___TFSqcfT_GSqx_ ---> specialized Optional.init() +_TTSg5Si_Sf___TFSqcfT_GSqx_ ---> specialized Optional.init() +_TTSg5Si_Sf___TFSqcfT_GSqx_ ---> specialized Optional.init() _TTSgS ---> _TTSgS _TTSg5S ---> _TTSg5S _TTSgSi ---> _TTSgSi @@ -158,48 +158,48 @@ _TTSgSi_ ---> _TTSgSi_ _TTSgSi__ ---> _TTSgSi__ _TTSgSiS_ ---> _TTSgSiS_ _TTSgSi__xyz ---> _TTSgSi__xyz -_TTSg5Si___TTSg5Si___TFSqcfT_GSqx_ ---> specialized specialized Optional.init() -> A? -_TTSg5Vs5UInt8___TFV10specialize3XXXcfT1tx_GS0_x_ ---> specialized XXX.init(t : A) -> XXX +_TTSg5Si___TTSg5Si___TFSqcfT_GSqx_ ---> specialized Optional.init() +_TTSg5Vs5UInt8___TFV10specialize3XXXcfT1tx_GS0_x_ ---> specialized XXX.init(t:) _TPA__TTRXFo_oSSoSS_dSb_XFo_iSSiSS_dSb_31 ---> partial apply for thunk for @callee_owned (@owned String, @owned String) -> (@unowned Bool) -_TiC4Meow5MyCls9subscriptFT1iSi_Sf ---> MyCls.subscript(i : Int) -> Float -_TF8manglingX22egbpdajGbuEbxfgehfvwxnFT_T_ ---> ليهمابتكلموشعربي؟() -> () -_TF8manglingX24ihqwcrbEcvIaIdqgAFGpqjyeFT_T_ ---> 他们为什么不说中文() -> () -_TF8manglingX27ihqwctvzcJBfGFJdrssDxIboAybFT_T_ ---> 他們爲什麽不說中文() -> () -_TF8manglingX30Proprostnemluvesky_uybCEdmaEBaFT_T_ ---> Pročprostěnemluvíčesky() -> () -_TF8manglingXoi7p_qcaDcFTSiSi_Si ---> «+» infix(Int, Int) -> Int -_TF8manglingoi2qqFTSiSi_T_ ---> ?? infix(Int, Int) -> () -_TFE11ext_structAV11def_structA1A4testfT_T_ ---> A.test() -> () -_TF13devirt_accessP5_DISC15getPrivateClassFT_CS_P5_DISC12PrivateClass ---> getPrivateClass() -> PrivateClass -_TF4mainP5_mainX3wxaFT_T_ ---> λ() -> () -_TF4mainP5_main3abcFT_aS_P5_DISC3xyz ---> abc() -> xyz +_TiC4Meow5MyCls9subscriptFT1iSi_Sf ---> MyCls.subscript(i:) +_TF8manglingX22egbpdajGbuEbxfgehfvwxnFT_T_ ---> ليهمابتكلموشعربي؟() +_TF8manglingX24ihqwcrbEcvIaIdqgAFGpqjyeFT_T_ ---> 他们为什么不说中文() +_TF8manglingX27ihqwctvzcJBfGFJdrssDxIboAybFT_T_ ---> 他們爲什麽不說中文() +_TF8manglingX30Proprostnemluvesky_uybCEdmaEBaFT_T_ ---> Pročprostěnemluvíčesky() +_TF8manglingXoi7p_qcaDcFTSiSi_Si ---> «+» infix(_:_:) +_TF8manglingoi2qqFTSiSi_T_ ---> ?? infix(_:_:) +_TFE11ext_structAV11def_structA1A4testfT_T_ ---> A.test() +_TF13devirt_accessP5_DISC15getPrivateClassFT_CS_P5_DISC12PrivateClass ---> getPrivateClass() +_TF4mainP5_mainX3wxaFT_T_ ---> λ() +_TF4mainP5_main3abcFT_aS_P5_DISC3xyz ---> abc() _TtPMP_ ---> Any.Type -_TFCs13_NSSwiftArray29canStoreElementsOfDynamicTypefPMP_Sb ---> _NSSwiftArray.canStoreElementsOfDynamicType(Any.Type) -> Bool +_TFCs13_NSSwiftArray29canStoreElementsOfDynamicTypefPMP_Sb ---> _NSSwiftArray.canStoreElementsOfDynamicType(_:) _TFCs13_NSSwiftArrayg17staticElementTypePMP_ ---> _NSSwiftArray.staticElementType.getter _TFCs17_DictionaryMirrorg9valueTypePMP_ ---> _DictionaryMirror.valueType.getter -_TPA__TFFVs11GeneratorOfcuRd__s13GeneratorTyperFqd__GS_x_U_FT_GSqx_ ---> partial apply for GeneratorOf.(init (A1) -> GeneratorOf).(closure #1) -_TTSf1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> specialized take_closure((Int, Int) -> ()) -> () -_TTSf1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TTSg5Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> specialized specialized take_closure((Int, Int) -> ()) -> () -_TTSg5Si___TTSf1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> specialized specialized take_closure((Int, Int) -> ()) -> () +_TPA__TFFVs11GeneratorOfcuRd__s13GeneratorTyperFqd__GS_x_U_FT_GSqx_ ---> partial apply for closure #1 in GeneratorOf.init(_:) +_TTSf1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> specialized take_closure(_:) +_TTSf1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TTSg5Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> specialized take_closure(_:) +_TTSg5Si___TTSf1cl35_TFF7specgen6callerFSiT_U_FTSiSi_T_Si___TF7specgen12take_closureFFTSiSi_T_T_ ---> specialized take_closure(_:) _TTSf1cpfr24_TF8capturep6helperFSiT__n___TTRXFo_dSi_dT__XFo_iSi_dT__ ---> specialized thunk for @callee_owned (@unowned Int) -> (@unowned ()) _TTSf1cpfr24_TF8capturep6helperFSiT__n___TTRXFo_dSi_DT__XFo_iSi_DT__ ---> specialized thunk for @callee_owned (@unowned Int) -> (@unowned_inner_pointer ()) -_TTSf1cpi0_cpfl0_cpse0v4u123_cpg53globalinit_33_06E7F1D906492AE070936A9B58CBAE1C_token8_cpfr36_TFtest_capture_propagation2_closure___TF7specgen12take_closureFFTSiSi_T_T_ ---> specialized take_closure((Int, Int) -> ()) -> () -_TTSf0gs___TFVs11_StringCore15_invariantCheckfT_T_ ---> specialized _StringCore._invariantCheck() -> () -_TTSf2g___TTSf2s_d___TFVs11_StringCoreCfVs13_StringBufferS_ ---> specialized specialized _StringCore.init(_StringBuffer) -> _StringCore -_TTSf2dg___TTSf2s_d___TFVs11_StringCoreCfVs13_StringBufferS_ ---> specialized specialized _StringCore.init(_StringBuffer) -> _StringCore -_TTSf2dgs___TTSf2s_d___TFVs11_StringCoreCfVs13_StringBufferS_ ---> specialized specialized _StringCore.init(_StringBuffer) -> _StringCore -_TTSf3d_i_d_i_d_i___TFVs11_StringCoreCfVs13_StringBufferS_ ---> specialized _StringCore.init(_StringBuffer) -> _StringCore -_TTSf3d_i_n_i_d_i___TFVs11_StringCoreCfVs13_StringBufferS_ ---> specialized _StringCore.init(_StringBuffer) -> _StringCore -_TFIZvV8mangling10HasVarInit5stateSbiu_KT_Sb ---> static HasVarInit.(state).(variable initialization expression).(implicit closure #1) -_TFFV23interface_type_mangling18GenericTypeContext23closureInGenericContexturFqd__T_L_3fooFTqd__x_T_ ---> GenericTypeContext.(closureInGenericContext (A1) -> ()).(foo #1)(A1, A) -> () -_TFFV23interface_type_mangling18GenericTypeContextg31closureInGenericPropertyContextxL_3fooFT_x ---> GenericTypeContext.(closureInGenericPropertyContext.getter).(foo #1)() -> A -_TTWurGV23interface_type_mangling18GenericTypeContextx_S_18GenericWitnessTestS_FS1_23closureInGenericContextu_RxS1_rfqd__T_ ---> protocol witness for GenericWitnessTest.closureInGenericContext (A1) -> () in conformance GenericTypeContext +_TTSf1cpi0_cpfl0_cpse0v4u123_cpg53globalinit_33_06E7F1D906492AE070936A9B58CBAE1C_token8_cpfr36_TFtest_capture_propagation2_closure___TF7specgen12take_closureFFTSiSi_T_T_ ---> specialized take_closure(_:) +_TTSf0gs___TFVs11_StringCore15_invariantCheckfT_T_ ---> specialized _StringCore._invariantCheck() +_TTSf2g___TTSf2s_d___TFVs11_StringCoreCfVs13_StringBufferS_ ---> specialized _StringCore.init(_:) +_TTSf2dg___TTSf2s_d___TFVs11_StringCoreCfVs13_StringBufferS_ ---> specialized _StringCore.init(_:) +_TTSf2dgs___TTSf2s_d___TFVs11_StringCoreCfVs13_StringBufferS_ ---> specialized _StringCore.init(_:) +_TTSf3d_i_d_i_d_i___TFVs11_StringCoreCfVs13_StringBufferS_ ---> specialized _StringCore.init(_:) +_TTSf3d_i_n_i_d_i___TFVs11_StringCoreCfVs13_StringBufferS_ ---> specialized _StringCore.init(_:) +_TFIZvV8mangling10HasVarInit5stateSbiu_KT_Sb ---> implicit closure #1 in variable initialization expression of static HasVarInit.state +_TFFV23interface_type_mangling18GenericTypeContext23closureInGenericContexturFqd__T_L_3fooFTqd__x_T_ ---> foo #1 (_:_:) in GenericTypeContext.closureInGenericContext(_:) +_TFFV23interface_type_mangling18GenericTypeContextg31closureInGenericPropertyContextxL_3fooFT_x ---> foo #1 () in GenericTypeContext.closureInGenericPropertyContext.getter +_TTWurGV23interface_type_mangling18GenericTypeContextx_S_18GenericWitnessTestS_FS1_23closureInGenericContextu_RxS1_rfqd__T_ ---> protocol witness for GenericWitnessTest.closureInGenericContext(_:) in conformance GenericTypeContext _TTWurGV23interface_type_mangling18GenericTypeContextx_S_18GenericWitnessTestS_FS1_g31closureInGenericPropertyContextwx3Tee ---> protocol witness for GenericWitnessTest.closureInGenericPropertyContext.getter in conformance GenericTypeContext -_TTWurGV23interface_type_mangling18GenericTypeContextx_S_18GenericWitnessTestS_FS1_16twoParamsAtDepthu0_RxS1_rfTqd__1yqd_0__T_ ---> protocol witness for GenericWitnessTest.twoParamsAtDepth (A1, y : B1) -> () in conformance GenericTypeContext -_TFC3red11BaseClassEHcfzT1aSi_S0_ ---> BaseClassEH.init(a : Int) throws -> BaseClassEH -_TFe27mangling_generic_extensionsR_S_8RunciblerVS_3Foog1aSi ---> Foo.a.getter -_TFe27mangling_generic_extensionsR_S_8RunciblerVS_3Foog1bx ---> Foo.b.getter +_TTWurGV23interface_type_mangling18GenericTypeContextx_S_18GenericWitnessTestS_FS1_16twoParamsAtDepthu0_RxS1_rfTqd__1yqd_0__T_ ---> protocol witness for GenericWitnessTest.twoParamsAtDepth(_:y:) in conformance GenericTypeContext +_TFC3red11BaseClassEHcfzT1aSi_S0_ ---> BaseClassEH.init(a:) +_TFe27mangling_generic_extensionsR_S_8RunciblerVS_3Foog1aSi ---> Foo.a.getter +_TFe27mangling_generic_extensionsR_S_8RunciblerVS_3Foog1bx ---> Foo.b.getter _TTRXFo_iT__iT_zoPs5Error__XFo__dT_zoPS___ ---> thunk for @callee_owned (@in ()) -> (@out (), @error @owned Error) _TFE1a ---> _TFE1a -_TFC4testP33_83378C430F65473055F1BD53F3ADCDB71C5doFoofT_T_ ---> C.doFoo() -> () +_TFC4testP33_83378C430F65473055F1BD53F3ADCDB71C5doFoofT_T_ ---> C.doFoo() _TTRXFo_oCSo13SKPhysicsBodydVSC7CGPointdVSC8CGVectordGSpV10ObjectiveC8ObjCBool___XFdCb_dS_dS0_dS1_dGSpS3____ ---> thunk for @callee_owned (@owned SKPhysicsBody, @unowned CGPoint, @unowned CGVector, @unowned UnsafeMutablePointer) -> () _T0So13SKPhysicsBodyCSC7CGPointVSC8CGVectorVSpy10ObjectiveC8ObjCBoolVGIxxyyy_AbdFSpyAIGIyByyyy_TR ---> thunk for @callee_owned (@owned SKPhysicsBody, @unowned CGPoint, @unowned CGVector, @unowned UnsafeMutablePointer) -> () diff --git a/test/Interpreter/tuple_casts.swift b/test/Interpreter/tuple_casts.swift index e1f1d08877f50..4c573a8dbaaef 100644 --- a/test/Interpreter/tuple_casts.swift +++ b/test/Interpreter/tuple_casts.swift @@ -47,7 +47,7 @@ tupleCastTests.test("Incorrect labels conditional cast") { tupleCastTests .test("Incorrect labels forced cast") - .crashOutputMatches("Could not cast value of type '(x : Swift.Int, z : Swift.Int)'") + .crashOutputMatches("Could not cast value of type '(x: Swift.Int, z: Swift.Int)'") .code { expectCrashLater() _ = anyToIntPoint((x: 1, z: 2)) diff --git a/test/Interpreter/typeof.swift b/test/Interpreter/typeof.swift index a88a9d907b0cc..bef828c9bba16 100644 --- a/test/Interpreter/typeof.swift +++ b/test/Interpreter/typeof.swift @@ -85,5 +85,5 @@ print(boxedExistentialMetatype(Meltdown())) print(boxedExistentialMetatype(GrilledCheese())) // CHECK: GrilledCheese print(boxedExistentialMetatype(GrilledCheese() as Meltdown)) -// CHECK: (x : Int, y : Int, Double) +// CHECK: (x: Int, y: Int, Double) print(type(of: labeledTuple())) diff --git a/test/Reflection/typeref_decoding.swift b/test/Reflection/typeref_decoding.swift index c459308be46a9..8246fb6f7b037 100644 --- a/test/Reflection/typeref_decoding.swift +++ b/test/Reflection/typeref_decoding.swift @@ -28,7 +28,7 @@ // CHECK: (enum TypesToReflect.E) // CHECK: (struct Swift.Int)) -// CHECK: aTupleWithLabels: (a : TypesToReflect.C, s : TypesToReflect.S, e : TypesToReflect.E) +// CHECK: aTupleWithLabels: (a: TypesToReflect.C, s: TypesToReflect.S, e: TypesToReflect.E) // CHECK: (tuple // CHECK: (class TypesToReflect.C) // CHECK: (struct TypesToReflect.S) diff --git a/test/SILGen/SILDeclRef.swift b/test/SILGen/SILDeclRef.swift index beeeec7be4529..17ddcf0acc7c8 100644 --- a/test/SILGen/SILDeclRef.swift +++ b/test/SILGen/SILDeclRef.swift @@ -55,16 +55,16 @@ public func testBase(b: Base) -> Int32 { // Check that vtables and witness tables contain SILDeclRefs with signatures. // CHECK: sil_vtable Base { -// CHECK-NEXT: #Base.foo!1: (Base) -> () -> Int32 : _T010SILDeclRef4BaseC3foos5Int32VyF // Base.foo() -> Int32 -// CHECK-NEXT: #Base.foo!1: (Base) -> (Int32) -> () : _T010SILDeclRef4BaseC3fooys5Int32V1n_tF // Base.foo(n : Int32) -> () -// CHECK-NEXT: #Base.foo!1: (Base) -> (Float) -> Int32 : _T010SILDeclRef4BaseC3foos5Int32VSf1f_tF // Base.foo(f : Float) -> Int32 -// CHECK-NEXT: #Base.init!initializer.1: (Base.Type) -> () -> Base : _T010SILDeclRef4BaseCACycfc // Base.init() -> Base +// CHECK-NEXT: #Base.foo!1: (Base) -> () -> Int32 : _T010SILDeclRef4BaseC3foos5Int32VyF // Base.foo() +// CHECK-NEXT: #Base.foo!1: (Base) -> (Int32) -> () : _T010SILDeclRef4BaseC3fooys5Int32V1n_tF // Base.foo(n:) +// CHECK-NEXT: #Base.foo!1: (Base) -> (Float) -> Int32 : _T010SILDeclRef4BaseC3foos5Int32VSf1f_tF // Base.foo(f:) +// CHECK-NEXT: #Base.init!initializer.1: (Base.Type) -> () -> Base : _T010SILDeclRef4BaseCACycfc // Base.init() // CHECK-NEXT: #Base.deinit!deallocator: _T010SILDeclRef4BaseCfD // Base.__deallocating_deinit // CHECK-NEXT: } // CHECK:sil_witness_table [serialized] Base: P module SILDeclRef { -// CHECK-NEXT: method #P.foo!1: (Self) -> () -> Int32 : @_T010SILDeclRef4BaseCAA1PA2aDP3foos5Int32VyFTW // protocol witness for P.foo() -> Int32 in conformance Base -// CHECK-NEXT: method #P.foo!1: (Self) -> (Int32) -> () : @_T010SILDeclRef4BaseCAA1PA2aDP3fooys5Int32V1n_tFTW // protocol witness for P.foo(n : Int32) -> () in conformance Base +// CHECK-NEXT: method #P.foo!1: (Self) -> () -> Int32 : @_T010SILDeclRef4BaseCAA1PA2aDP3foos5Int32VyFTW // protocol witness for P.foo() +// CHECK-NEXT: method #P.foo!1: (Self) -> (Int32) -> () : @_T010SILDeclRef4BaseCAA1PA2aDP3fooys5Int32V1n_tFTW // protocol witness for P.foo(n:) in conformance Base // CHECK-NEXT: } diff --git a/test/SILGen/accessibility_vtables.swift b/test/SILGen/accessibility_vtables.swift index 00c1fc01e4d58..3d03fee64a11a 100644 --- a/test/SILGen/accessibility_vtables.swift +++ b/test/SILGen/accessibility_vtables.swift @@ -21,7 +21,7 @@ class Sub : Base { // CHECK-NEXT: #Base.prop!getter.1: {{.*}} : _T021accessibility_vtables3SubC4propSifg // accessibility_vtables.Sub.prop.getter : Swift.Int // CHECK-NEXT: #Base.prop!setter.1: {{.*}} : _T028accessibility_vtables_helper4BaseC4propSifs // accessibility_vtables_helper.Base.prop.setter : Swift.Int // CHECK-NEXT: #Base.prop!materializeForSet.1: {{.*}} : _T028accessibility_vtables_helper4BaseC4propSifm // accessibility_vtables_helper.Base.prop.materializeForSet : Swift.Int -// CHECK-NEXT: #Base.init!initializer.1: {{.*}} : _T021accessibility_vtables3SubCACycfc // accessibility_vtables.Sub.init () -> accessibility_vtables.Sub +// CHECK-NEXT: #Base.init!initializer.1: {{.*}} : _T021accessibility_vtables3SubCACycfc // accessibility_vtables.Sub.init() -> accessibility_vtables.Sub // CHECK-NEXT: #Sub.internalMethod!1: {{.*}} : _T021accessibility_vtables3SubC14internalMethodyyF // CHECK-NEXT: #Sub.prop!setter.1: {{.*}} : _T021accessibility_vtables3SubC4propSifs // accessibility_vtables.Sub.prop.setter : Swift.Int // CHECK-NEXT: #Sub.prop!materializeForSet.1: {{.*}} : _T021accessibility_vtables3SubC4propSifm // accessibility_vtables.Sub.prop.materializeForSet : Swift.Int diff --git a/test/SILGen/accessors.swift b/test/SILGen/accessors.swift index b436c2ca45c8b..da1e714700958 100644 --- a/test/SILGen/accessors.swift +++ b/test/SILGen/accessors.swift @@ -30,12 +30,12 @@ func test0(_ ref: A) { // CHECK-NEXT: debug_value // Formal evaluation of LHS. // CHECK-NEXT: [[BORROWED_ARG_LHS:%.*]] = begin_borrow [[ARG]] -// CHECK-NEXT: // function_ref accessors.index0 () -> Swift.Int +// CHECK-NEXT: // function_ref accessors.index0() -> Swift.Int // CHECK-NEXT: [[T0:%.*]] = function_ref @_T09accessors6index0SiyF // CHECK-NEXT: [[INDEX0:%.*]] = apply [[T0]]() // Formal evaluation of RHS. // CHECK-NEXT: [[BORROWED_ARG_RHS:%.*]] = begin_borrow [[ARG]] -// CHECK-NEXT: // function_ref accessors.index1 () -> Swift.Int +// CHECK-NEXT: // function_ref accessors.index1() -> Swift.Int // CHECK-NEXT: [[T0:%.*]] = function_ref @_T09accessors6index1SiyF // CHECK-NEXT: [[INDEX1:%.*]] = apply [[T0]]() // Formal access to RHS. @@ -104,12 +104,12 @@ func test1(_ ref: B) { // CHECK-NEXT: debug_value // Formal evaluation of LHS. // CHECK-NEXT: [[BORROWED_ARG_LHS:%.*]] = begin_borrow [[ARG]] -// CHECK-NEXT: // function_ref accessors.index0 () -> Swift.Int +// CHECK-NEXT: // function_ref accessors.index0() -> Swift.Int // CHECK-NEXT: [[T0:%.*]] = function_ref @_T09accessors6index0SiyF // CHECK-NEXT: [[INDEX0:%.*]] = apply [[T0]]() // Formal evaluation of RHS. // CHECK-NEXT: [[BORROWED_ARG_RHS:%.*]] = begin_borrow [[ARG]] -// CHECK-NEXT: // function_ref accessors.index1 () -> Swift.Int +// CHECK-NEXT: // function_ref accessors.index1() -> Swift.Int // CHECK-NEXT: [[T0:%.*]] = function_ref @_T09accessors6index1SiyF // CHECK-NEXT: [[INDEX1:%.*]] = apply [[T0]]() // Formal access to RHS. diff --git a/test/SILGen/coverage_while.swift b/test/SILGen/coverage_while.swift index 7e7535e5e2915..4d9f24cae9423 100644 --- a/test/SILGen/coverage_while.swift +++ b/test/SILGen/coverage_while.swift @@ -1,6 +1,6 @@ // RUN: %target-swift-frontend -Xllvm -sil-full-demangle -suppress-warnings -profile-generate -profile-coverage-mapping -emit-sorted-sil -emit-sil -module-name coverage_while %s | %FileCheck %s -// CHECK-LABEL: // coverage_while.eoo () -> () +// CHECK-LABEL: // coverage_while.eoo() -> () func eoo() { // CHECK: int_instrprof_increment var x : Int32 = 0 diff --git a/test/SILGen/default_constructor.swift b/test/SILGen/default_constructor.swift index e3c32a09c012f..9b4b2ab1a62d5 100644 --- a/test/SILGen/default_constructor.swift +++ b/test/SILGen/default_constructor.swift @@ -90,10 +90,10 @@ struct G { let bar: Int32? } -// CHECK-NOT: default_constructor.G.init () -// CHECK-LABEL: default_constructor.G.init (bar : Swift.Optional) +// CHECK-NOT: default_constructor.G.init() +// CHECK-LABEL: default_constructor.G.init(bar: Swift.Optional) // CHECK-NEXT: sil hidden @_T019default_constructor1GV{{[_0-9a-zA-Z]*}}fC -// CHECK-NOT: default_constructor.G.init () +// CHECK-NOT: default_constructor.G.init() struct H { var opt: T? diff --git a/test/SILGen/dynamic.swift b/test/SILGen/dynamic.swift index 9cb0e5cab412b..4a15ffd38aac3 100644 --- a/test/SILGen/dynamic.swift +++ b/test/SILGen/dynamic.swift @@ -488,16 +488,16 @@ public class ConcreteDerived : GenericBase { // CHECK-NEXT: #Foo.nativeProp!getter.1: {{.*}} : _T07dynamic3FooC10nativePropSifg // dynamic.Foo.nativeProp.getter : Swift.Int // CHECK-NEXT: #Foo.nativeProp!setter.1: {{.*}} : _T07dynamic3FooC10nativePropSifs // dynamic.Foo.nativeProp.setter : Swift.Int // CHECK-NEXT: #Foo.nativeProp!materializeForSet.1 -// CHECK-NEXT: #Foo.subscript!getter.1: {{.*}} : _T07dynamic3FooC9subscriptS2i6native_tcfg // dynamic.Foo.subscript.getter : (native : Swift.Int) -> Swift.Int -// CHECK-NEXT: #Foo.subscript!setter.1: {{.*}} : _T07dynamic3FooC9subscriptS2i6native_tcfs // dynamic.Foo.subscript.setter : (native : Swift.Int) -> Swift.Int +// CHECK-NEXT: #Foo.subscript!getter.1: {{.*}} : _T07dynamic3FooC9subscriptS2i6native_tcfg // dynamic.Foo.subscript.getter : (native: Swift.Int) -> Swift.Int +// CHECK-NEXT: #Foo.subscript!setter.1: {{.*}} : _T07dynamic3FooC9subscriptS2i6native_tcfs // dynamic.Foo.subscript.setter : (native: Swift.Int) -> Swift.Int // CHECK-NEXT: #Foo.subscript!materializeForSet.1 // CHECK-NEXT: #Foo.init!initializer.1: {{.*}} : _T07dynamic3FooCACSi4objc_tcfc // CHECK-NEXT: #Foo.objcMethod!1: {{.*}} : _T07dynamic3FooC10objcMethodyyF // CHECK-NEXT: #Foo.objcProp!getter.1: {{.*}} : _T07dynamic3FooC8objcPropSifg // dynamic.Foo.objcProp.getter : Swift.Int // CHECK-NEXT: #Foo.objcProp!setter.1: {{.*}} : _T07dynamic3FooC8objcPropSifs // dynamic.Foo.objcProp.setter : Swift.Int // CHECK-NEXT: #Foo.objcProp!materializeForSet.1 -// CHECK-NEXT: #Foo.subscript!getter.1: {{.*}} : _T07dynamic3FooC9subscriptSis9AnyObject_p4objc_tcfg // dynamic.Foo.subscript.getter : (objc : Swift.AnyObject) -> Swift.Int -// CHECK-NEXT: #Foo.subscript!setter.1: {{.*}} : _T07dynamic3FooC9subscriptSis9AnyObject_p4objc_tcfs // dynamic.Foo.subscript.setter : (objc : Swift.AnyObject) -> Swift.Int +// CHECK-NEXT: #Foo.subscript!getter.1: {{.*}} : _T07dynamic3FooC9subscriptSis9AnyObject_p4objc_tcfg // dynamic.Foo.subscript.getter : (objc: Swift.AnyObject) -> Swift.Int +// CHECK-NEXT: #Foo.subscript!setter.1: {{.*}} : _T07dynamic3FooC9subscriptSis9AnyObject_p4objc_tcfs // dynamic.Foo.subscript.setter : (objc: Swift.AnyObject) -> Swift.Int // CHECK-NEXT: #Foo.subscript!materializeForSet // CHECK-NEXT: #Foo.overriddenByDynamic!1: {{.*}} : _T07dynamic3FooC19overriddenByDynamic{{[_0-9a-zA-Z]*}} // CHECK-NEXT: #Foo.deinit!deallocator: {{.*}} @@ -510,13 +510,13 @@ public class ConcreteDerived : GenericBase { // No vtable entry for override of @objc extension property // CHECK-LABEL: sil_vtable SubExt { -// CHECK-NEXT: #BaseExt.init!initializer.1: (BaseExt.Type) -> () -> BaseExt : _T07dynamic6SubExtCACycfc // dynamic.SubExt.init () -> dynamic.SubExt +// CHECK-NEXT: #BaseExt.init!initializer.1: (BaseExt.Type) -> () -> BaseExt : _T07dynamic6SubExtCACycfc // dynamic.SubExt.init() -> dynamic.SubExt // CHECK-NEXT: #SubExt.deinit!deallocator: _T07dynamic6SubExtCfD // dynamic.SubExt.__deallocating_deinit // CHECK-NEXT: } // Dynamic thunk + vtable re-abstraction // CHECK-LABEL: sil_vtable ConcreteDerived { -// CHECK-NEXT: #GenericBase.method!1: (GenericBase) -> (T) -> () : public _T07dynamic15ConcreteDerivedC6methodySiFAA11GenericBaseCADyxFTV // vtable thunk for dynamic.GenericBase.method (A) -> () dispatching to dynamic.ConcreteDerived.method (Swift.Int) -> () -// CHECK-NEXT: #GenericBase.init!initializer.1: (GenericBase.Type) -> () -> GenericBase : _T07dynamic15ConcreteDerivedCACycfc // dynamic.ConcreteDerived.init () -> dynamic.ConcreteDerived +// CHECK-NEXT: #GenericBase.method!1: (GenericBase) -> (T) -> () : public _T07dynamic15ConcreteDerivedC6methodySiFAA11GenericBaseCADyxFTV // vtable thunk for dynamic.GenericBase.method(A) -> () dispatching to dynamic.ConcreteDerived.method(Swift.Int) -> () +// CHECK-NEXT: #GenericBase.init!initializer.1: (GenericBase.Type) -> () -> GenericBase : _T07dynamic15ConcreteDerivedCACycfc // dynamic.ConcreteDerived.init() -> dynamic.ConcreteDerived // CHECK-NEXT: #ConcreteDerived.deinit!deallocator: _T07dynamic15ConcreteDerivedCfD // dynamic.ConcreteDerived.__deallocating_deinit // CHECK-NEXT: } diff --git a/test/SILGen/errors.swift b/test/SILGen/errors.swift index c3b0a273e6d16..fb268f12d03e0 100644 --- a/test/SILGen/errors.swift +++ b/test/SILGen/errors.swift @@ -947,6 +947,6 @@ class SomeErrorClass : Error { } class OtherErrorSub : OtherError { } // CHECK-LABEL: sil_vtable OtherErrorSub { -// CHECK-NEXT: #OtherError.init!initializer.1: {{.*}} : _T06errors13OtherErrorSubCACycfc // OtherErrorSub.init() -> OtherErrorSub +// CHECK-NEXT: #OtherError.init!initializer.1: {{.*}} : _T06errors13OtherErrorSubCACycfc // OtherErrorSub.init() // CHECK-NEXT: #OtherErrorSub.deinit!deallocator: _T06errors13OtherErrorSubCfD // OtherErrorSub.__deallocating_deinit // CHECK-NEXT:} diff --git a/test/SILGen/functions.swift b/test/SILGen/functions.swift index 784d95bce23c4..997c26aecfc41 100644 --- a/test/SILGen/functions.swift +++ b/test/SILGen/functions.swift @@ -413,7 +413,7 @@ final class r17828355Class { // The curry thunk for the method should not include a class_method instruction. // CHECK-LABEL: sil shared [thunk] @_T09functions14r17828355ClassC6method // CHECK: bb0(%0 : $r17828355Class): -// CHECK-NEXT: // function_ref functions.r17828355Class.method (Builtin.Int64) -> () +// CHECK-NEXT: // function_ref functions.r17828355Class.method(Builtin.Int64) -> () // CHECK-NEXT: %1 = function_ref @_T09functions14r17828355ClassC6method{{[_0-9a-zA-Z]*}}F : $@convention(method) (Builtin.Int64, @guaranteed r17828355Class) -> () // CHECK-NEXT: partial_apply %1(%0) : $@convention(method) (Builtin.Int64, @guaranteed r17828355Class) -> () // CHECK-NEXT: return @@ -434,14 +434,14 @@ func testNoescape() { markUsed(a) } -// CHECK-LABEL: functions.testNoescape () -> () +// CHECK-LABEL: functions.testNoescape() -> () // CHECK-NEXT: sil hidden @_T09functions12testNoescapeyyF : $@convention(thin) () -> () -// CHECK: function_ref functions.(testNoescape () -> ()).(closure #1) +// CHECK: function_ref closure #1 () -> () in functions.testNoescape() -> () // CHECK-NEXT: function_ref @_T09functions12testNoescapeyyFyycfU_ : $@convention(thin) (@owned { var Int }) -> () // Despite being a noescape closure, this needs to capture 'a' by-box so it can // be passed to the capturing closure.closure -// CHECK: functions.(testNoescape () -> ()).(closure #1) +// CHECK: closure #1 () -> () in functions.testNoescape() -> () // CHECK-NEXT: sil private @_T09functions12testNoescapeyyFyycfU_ : $@convention(thin) (@owned { var Int }) -> () { @@ -461,10 +461,10 @@ func testNoescape2() { // CHECK-LABEL: sil hidden @_T09functions13testNoescape2yyF : $@convention(thin) () -> () { -// CHECK: // functions.(testNoescape2 () -> ()).(closure #1) +// CHECK: // closure #1 () -> () in functions.testNoescape2() -> () // CHECK-NEXT: sil private @_T09functions13testNoescape2yyFyycfU_ : $@convention(thin) (@owned { var Int }) -> () { -// CHECK: // functions.(testNoescape2 () -> ()).(closure #1).(closure #1) +// CHECK: // closure #1 () -> () in closure #1 () -> () in functions.testNoescape2() -> () // CHECK-NEXT: sil private @_T09functions13testNoescape2yyFyycfU_yycfU_ : $@convention(thin) (@owned { var Int }) -> () { enum PartialApplyEnumPayload { diff --git a/test/SILGen/generic_local_property.swift b/test/SILGen/generic_local_property.swift index 798f2989c1813..7ba35a143f44a 100644 --- a/test/SILGen/generic_local_property.swift +++ b/test/SILGen/generic_local_property.swift @@ -21,10 +21,10 @@ func foo(x: T, y: Int) { } } - // CHECK-LABEL: function_ref (foo (x : A, y : Int) -> ()).(readonly #1).getter + // CHECK-LABEL: function_ref getter of readonly #1 in foo(x:y:) _ = readonly - // CHECK-LABEL: function_ref (foo (x : A, y : Int) -> ()).(mutable #1).getter + // CHECK-LABEL: function_ref getter of mutable #1 in foo(x:y:) _ = mutable - // CHECK-LABEL: function_ref (foo (x : A, y : Int) -> ()).(mutable #1).setter + // CHECK-LABEL: function_ref setter of mutable #1 in foo(x:y:) mutable = y } diff --git a/test/SILGen/if_while_binding.swift b/test/SILGen/if_while_binding.swift index c7f69fd9282ab..74e44e78efd7b 100644 --- a/test/SILGen/if_while_binding.swift +++ b/test/SILGen/if_while_binding.swift @@ -259,7 +259,7 @@ func if_multi_where() { // CHECK: br [[ELSE]] // CHECK: [[CHECK_WHERE]]([[B:%[0-9]+]] : $String): - // CHECK: function_ref Swift.Bool._getBuiltinLogicValue () -> Builtin.Int1 + // CHECK: function_ref Swift.Bool._getBuiltinLogicValue() -> Builtin.Int1 // CHECK: cond_br {{.*}}, [[IF_BODY:bb[0-9]+]], [[IF_EXIT3:bb[0-9]+]] // CHECK: [[IF_EXIT3]]: // CHECK: destroy_value [[BBOX]] diff --git a/test/SILGen/interface_type_mangling.swift b/test/SILGen/interface_type_mangling.swift index 07d70f2d1cc4b..a67468f11df74 100644 --- a/test/SILGen/interface_type_mangling.swift +++ b/test/SILGen/interface_type_mangling.swift @@ -22,164 +22,164 @@ class Base: Q, A { } // CHECK-LABEL: interface_type_mangling.f1 -// CHECK: [[F_SIGNATURE: \(A\) -> \(\)]] +// CHECK: [[F_SIGNATURE:\(A\) -> \(\)]] func f1(_ x: T) {} -// CHECK: interface_type_mangling.f2 [[F_SIGNATURE]] +// CHECK: interface_type_mangling.f2[[F_SIGNATURE]] func f2(_ x: T) {} -// CHECK: interface_type_mangling.f3 [[F_SIGNATURE]] +// CHECK: interface_type_mangling.f3[[F_SIGNATURE]] func f3(_ x: T) {} // CHECK-LABEL: interface_type_mangling.g1 -// CHECK: [[G_SIGNATURE: \(B, y : A\) -> \(\)]] +// CHECK: [[G_SIGNATURE:\(B, y: A\) -> \(\)]] func g1(_ x: T, y: U) {} -// CHECK: interface_type_mangling.g2 [[G_SIGNATURE]] +// CHECK: interface_type_mangling.g2[[G_SIGNATURE]] func g2(_ x: T, y: U) {} -// CHECK: interface_type_mangling.g3 [[G_SIGNATURE]] +// CHECK: interface_type_mangling.g3[[G_SIGNATURE]] func g3(_ x: T, y: U) {} // CHECK-LABEL: interface_type_mangling.h1 -// CHECK: [[H_SIGNATURE: \(A\) -> \(\)]] +// CHECK: [[H_SIGNATURE:\(A\) -> \(\)]] func h1(_ x: T) {} -// CHECK: interface_type_mangling.h2 [[H_SIGNATURE]] +// CHECK: interface_type_mangling.h2[[H_SIGNATURE]] func h2(_ x: T) {} -// CHECK: interface_type_mangling.h3 [[H_SIGNATURE]] +// CHECK: interface_type_mangling.h3[[H_SIGNATURE]] func h3(_ x: T) {} -// CHECK: interface_type_mangling.h4 [[H_SIGNATURE]] +// CHECK: interface_type_mangling.h4[[H_SIGNATURE]] func h4(_ x: T) {} -// CHECK: interface_type_mangling.h5 [[H_SIGNATURE]] +// CHECK: interface_type_mangling.h5[[H_SIGNATURE]] func h5(_ x: T) {} // CHECK-LABEL: interface_type_mangling.i1 -// CHECK: [[I_SIGNATURE: \(A\) -> \(\)]] +// CHECK: [[I_SIGNATURE:\(A\) -> \(\)]] func i1(_ x: T) {} -// CHECK: interface_type_mangling.i2 [[I_SIGNATURE]] +// CHECK: interface_type_mangling.i2[[I_SIGNATURE]] func i2(_ x: T) {} // CHECK-LABEL: interface_type_mangling.j01 -// CHECK: [[J_SIGNATURE: \(A\) -> \(\)]] +// CHECK: [[J_SIGNATURE:\(A\) -> \(\)]] func j01(_ x: T) {} -// CHECK: interface_type_mangling.j02 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j02[[J_SIGNATURE]] func j02(_ x: T) {} -// CHECK: interface_type_mangling.j03 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j03[[J_SIGNATURE]] func j03(_ x: T) {} -// CHECK: interface_type_mangling.j04 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j04[[J_SIGNATURE]] func j04(_ x: T) {} -// CHECK: interface_type_mangling.j05 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j05[[J_SIGNATURE]] func j05(_ x: T) {} -// CHECK: interface_type_mangling.j06 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j06[[J_SIGNATURE]] func j06(_ x: T) {} -// CHECK: interface_type_mangling.j07 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j07[[J_SIGNATURE]] func j07(_ x: T) {} -// CHECK: interface_type_mangling.j08 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j08[[J_SIGNATURE]] func j08(_ x: T) {} -// CHECK: interface_type_mangling.j09 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j09[[J_SIGNATURE]] func j09(_ x: T) {} -// CHECK: interface_type_mangling.j10 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j10[[J_SIGNATURE]] func j10(_ x: T) {} -// CHECK: interface_type_mangling.j11 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j11[[J_SIGNATURE]] func j11(_ x: T) {} -// CHECK: interface_type_mangling.j12 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j12[[J_SIGNATURE]] func j12(_ x: T) {} -// CHECK: interface_type_mangling.j13 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j13[[J_SIGNATURE]] func j13(_ x: T) {} -// CHECK: interface_type_mangling.j14 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j14[[J_SIGNATURE]] func j14(_ x: T) {} -// CHECK: interface_type_mangling.j15 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j15[[J_SIGNATURE]] func j15(_ x: T) {} -// CHECK: interface_type_mangling.j16 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j16[[J_SIGNATURE]] func j16(_ x: T) {} -// CHECK: interface_type_mangling.j17 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j17[[J_SIGNATURE]] func j17(_ x: T) {} -// CHECK: interface_type_mangling.j18 [[J_SIGNATURE]] +// CHECK: interface_type_mangling.j18[[J_SIGNATURE]] func j18(_ x: T) {} struct S {} struct G {} // CHECK-LABEL: interface_type_mangling.k01 -// CHECK: [[K_SIGNATURE: \(A\) -> \(\)]] +// CHECK: [[K_SIGNATURE:\(A\) -> \(\)]] func k01(_ x: T) {} -// CHECK: interface_type_mangling.k02 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k02[[K_SIGNATURE]] func k02(_ x: T) {} -// CHECK: interface_type_mangling.k03 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k03[[K_SIGNATURE]] func k03(_ x: T) {} -// CHECK: interface_type_mangling.k04 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k04[[K_SIGNATURE]] func k04(_ x: T) {} -// CHECK: interface_type_mangling.k05 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k05[[K_SIGNATURE]] func k05(_ x: T) {} -// CHECK: interface_type_mangling.k06 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k06[[K_SIGNATURE]] func k06(_ x: T) {} -// CHECK: interface_type_mangling.k07 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k07[[K_SIGNATURE]] func k07(_ x: T) {} -// CHECK: interface_type_mangling.k08 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k08[[K_SIGNATURE]] func k08(_ x: T) {} -// CHECK: interface_type_mangling.k09 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k09[[K_SIGNATURE]] func k09(_ x: T) {} -// CHECK: interface_type_mangling.k10 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k10[[K_SIGNATURE]] func k10(_ x: T) {} -// CHECK: interface_type_mangling.k11 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k11[[K_SIGNATURE]] func k11(_ x: T) {} -// CHECK: interface_type_mangling.k12 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k12[[K_SIGNATURE]] func k12(_ x: T) {} -// CHECK: interface_type_mangling.k13 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k13[[K_SIGNATURE]] func k13(_ x: T) {} -// CHECK: interface_type_mangling.k14 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k14[[K_SIGNATURE]] func k14(_ x: T) {} -// CHECK: interface_type_mangling.k15 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k15[[K_SIGNATURE]] func k15(_ x: T) {} -// CHECK: interface_type_mangling.k16 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k16[[K_SIGNATURE]] func k16(_ x: T) {} -// CHECK: interface_type_mangling.k17 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k17[[K_SIGNATURE]] func k17(_ x: T) {} -// CHECK: interface_type_mangling.k18 [[K_SIGNATURE]] +// CHECK: interface_type_mangling.k18[[K_SIGNATURE]] func k18(_ x: T) {} // CHECK-LABEL: interface_type_mangling.L01 -// CHECK: [[L_SIGNATURE:, A.Assoc2 == interface_type_mangling.G> \(A\) -> \(\)]] +// CHECK: [[L_SIGNATURE:, A.Assoc2 == interface_type_mangling.G>\(A\) -> \(\)]] func L01 == T.Assoc1, T.Assoc1 == T.Assoc2>(_ x: T) {} -// CHECK: interface_type_mangling.L02 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L02[[L_SIGNATURE]] func L02 == T.Assoc2, T.Assoc1 == T.Assoc2>(_ x: T) {} -// CHECK: interface_type_mangling.L03 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L03[[L_SIGNATURE]] func L03 == T.Assoc2, T.Assoc1 == G>(_ x: T) {} -// CHECK: interface_type_mangling.L04 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L04[[L_SIGNATURE]] func L04, T.Assoc1 == T.Assoc2>(_ x: T) {} -// CHECK: interface_type_mangling.L05 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L05[[L_SIGNATURE]] func L05, T.Assoc1 == T.Assoc2>(_ x: T) {} -// CHECK: interface_type_mangling.L06 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L06[[L_SIGNATURE]] func L06, T.Assoc1 == G>(_ x: T) {} -// CHECK: interface_type_mangling.L07 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L07[[L_SIGNATURE]] func L07, T.Assoc2 == T.Assoc1>(_ x: T) {} -// CHECK: interface_type_mangling.L08 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L08[[L_SIGNATURE]] func L08, T.Assoc2 == T.Assoc1>(_ x: T) {} -// CHECK: interface_type_mangling.L09 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L09[[L_SIGNATURE]] func L09, G == T.Assoc1>(_ x: T) {} -// CHECK: interface_type_mangling.L10 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L10[[L_SIGNATURE]] func L10 == T.Assoc1>(_ x: T) {} -// CHECK: interface_type_mangling.L11 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L11[[L_SIGNATURE]] func L11 == T.Assoc2>(_ x: T) {} -// CHECK: interface_type_mangling.L12 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L12[[L_SIGNATURE]] func L12, G == T.Assoc2>(_ x: T) {} -// CHECK: interface_type_mangling.L13 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L13[[L_SIGNATURE]] func L13>(_ x: T) {} -// CHECK: interface_type_mangling.L14 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L14[[L_SIGNATURE]] func L14>(_ x: T) {} -// CHECK: interface_type_mangling.L15 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L15[[L_SIGNATURE]] func L15, T.Assoc2 == G>(_ x: T) {} -// CHECK: interface_type_mangling.L16 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L16[[L_SIGNATURE]] func L16>(_ x: T) {} -// CHECK: interface_type_mangling.L17 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L17[[L_SIGNATURE]] func L17>(_ x: T) {} -// CHECK: interface_type_mangling.L18 [[L_SIGNATURE]] +// CHECK: interface_type_mangling.L18[[L_SIGNATURE]] func L18 == T.Assoc1, T.Assoc2 == G>(_ x: T) {} struct X {}; struct Y {} // CHECK-LABEL: interface_type_mangling.m1 -// CHECK: [[M_SIGNATURE: \(A, y : B\) -> \(\)]] +// CHECK: [[M_SIGNATURE:\(A, y: B\) -> \(\)]] func m1(_ x: T, y: U) {} -// CHECK: interface_type_mangling.m2 [[M_SIGNATURE]] +// CHECK: interface_type_mangling.m2[[M_SIGNATURE]] func m2(_ x: T, y: U) {} -// CHECK: interface_type_mangling.m3 [[M_SIGNATURE]] +// CHECK: interface_type_mangling.m3[[M_SIGNATURE]] func m3(_ x: T, y: U) {} protocol GenericWitnessTest { @@ -209,16 +209,16 @@ struct GenericTypeContext: GenericWitnessTest { } // FIXME: Demangling for generic params at depth is wrong. - // CHECK-LABEL: twoParamsAtDepth (A1, y : B1) -> () + // CHECK-LABEL: twoParamsAtDepth(A1, y: B1) -> () // CHECK-LABEL: sil hidden @_T023interface_type_mangling18GenericTypeContextV16twoParamsAtDepthyqd___qd_0_1ytr0_lF func twoParamsAtDepth(_ x: A, y: B) {} } -// CHECK-LABEL: protocol witness for interface_type_mangling.GenericWitnessTest.closureInGenericContext (A1) -> () in conformance interface_type_mangling.GenericTypeContext : interface_type_mangling.GenericWitnessTest in interface_type_mangling +// CHECK-LABEL: protocol witness for interface_type_mangling.GenericWitnessTest.closureInGenericContext(A1) -> () in conformance interface_type_mangling.GenericTypeContext : interface_type_mangling.GenericWitnessTest in interface_type_mangling // CHECK-LABEL: @_T023interface_type_mangling18GenericTypeContextVyxGAA0D11WitnessTestAAlAaEP09closureIndF0yqd__lFTW // CHECK-LABEL: protocol witness for interface_type_mangling.GenericWitnessTest.closureInGenericPropertyContext.getter : A.Tee in conformance interface_type_mangling.GenericTypeContext : interface_type_mangling.GenericWitnessTest in interface_type_mangling // CHECK-LABEL: @_T023interface_type_mangling18GenericTypeContextVyxGAA0D11WitnessTestAAlAaEP09closureInd8PropertyF03TeeQzfgTW -// CHECK-LABEL: protocol witness for interface_type_mangling.GenericWitnessTest.twoParamsAtDepth (A1, y : B1) -> () in conformance interface_type_mangling.GenericTypeContext : interface_type_mangling.GenericWitnessTest in interface_type_mangling +// CHECK-LABEL: protocol witness for interface_type_mangling.GenericWitnessTest.twoParamsAtDepth(A1, y: B1) -> () in conformance interface_type_mangling.GenericTypeContext : interface_type_mangling.GenericWitnessTest in interface_type_mangling // CHECK-LABEL: @_T023interface_type_mangling18GenericTypeContextVyxGAA0D11WitnessTestAAlAaEP16twoParamsAtDepthyqd___qd_0_1ytr0_lFTW diff --git a/test/SILGen/mangling.swift b/test/SILGen/mangling.swift index cc637c576ce6f..95748e194ee06 100644 --- a/test/SILGen/mangling.swift +++ b/test/SILGen/mangling.swift @@ -101,7 +101,7 @@ func instantiateGenericUnionConstructor(_ t: T) { struct HasVarInit { static var state = true && false } -// CHECK-LABEL: // function_ref static mangling.HasVarInit.(state : Swift.Bool).(variable initialization expression).(implicit closure #1) +// CHECK-LABEL: // function_ref implicit closure #1 : @autoclosure () throws -> Swift.Bool in variable initialization expression of static mangling.HasVarInit.state : Swift.Bool // CHECK-NEXT: function_ref @_T08mangling10HasVarInitV5stateSbvZfiSbyKXKfu_ // auto_closures should not collide with the equivalent non-auto_closure diff --git a/test/SILGen/nested_generics.swift b/test/SILGen/nested_generics.swift index 8e11a12edd26a..b2fdb74b0d321 100644 --- a/test/SILGen/nested_generics.swift +++ b/test/SILGen/nested_generics.swift @@ -40,13 +40,13 @@ struct Lunch where T.Topping : CuredMeat { } } -// CHECK-LABEL: // nested_generics.Lunch.Dinner.coolCombination (t : A.Topping, u : nested_generics.Deli.Mustard) -> () +// CHECK-LABEL: // nested_generics.Lunch.Dinner.coolCombination(t: A.Topping, u: nested_generics.Deli.Mustard) -> () // CHECK-LABEL: sil hidden @_T015nested_generics5LunchV6DinnerV15coolCombinationy7ToppingQz1t_AA4DeliC7MustardOyAA6PepperV_G1utF : $@convention(method) .Mustard> (@in T.Topping, Deli.Mustard, @in_guaranteed Lunch.Dinner) -> () -// CHECK-LABEL: // nested_generics.Lunch.Dinner.(coolCombination (t : A.Topping, u : nested_generics.Deli.Mustard) -> ()).(nestedGeneric #1) .Mustard> (x : A2, y : B2) -> (A2, B2) +// CHECK-LABEL: // nestedGeneric #1 .Mustard>(x: A2, y: B2) -> (A2, B2) in nested_generics.Lunch.Dinner.coolCombination(t: A.Topping, u: nested_generics.Deli.Mustard) -> () // CHECK-LABEL: sil private @_T015nested_generics5LunchV6DinnerV15coolCombinationy7ToppingQz1t_AA4DeliC7MustardOyAA6PepperV_G1utF0A7GenericL_qd0___qd0_0_tqd0__1x_qd0_0_1ytAA5PizzaRzAA6HotDogRd__AA9CuredMeatAHRQAP9CondimentRtd__r__0_lF : $@convention(thin) .Mustard> (@in X, @in Y) -> (@out X, @out Y) -// CHECK-LABEL: // nested_generics.Lunch.Dinner.init (firstCourse : A, secondCourse : Swift.Optional, leftovers : A, transformation : (A) -> A1) -> nested_generics.Lunch.Dinner +// CHECK-LABEL: // nested_generics.Lunch.Dinner.init(firstCourse: A, secondCourse: Swift.Optional, leftovers: A, transformation: (A) -> A1) -> nested_generics.Lunch.Dinner // CHECK-LABEL: sil hidden @_T015nested_generics5LunchV6DinnerVAEyx_qd__Gx11firstCourse_qd__Sg06secondF0x9leftoversqd__xc14transformationtcfC : $@convention(method) .Mustard> (@owned T, @in Optional, @owned T, @owned @callee_owned (@owned T) -> @out U, @thin Lunch.Dinner.Type) -> @out Lunch.Dinner // Non-generic nested inside generic @@ -63,7 +63,7 @@ class Deli : CuredMeat { } } -// CHECK-LABEL: // nested_generics.Deli.Pepperoni.init () -> nested_generics.Deli.Pepperoni +// CHECK-LABEL: // nested_generics.Deli.Pepperoni.init() -> nested_generics.Deli.Pepperoni // CHECK-LABEL: sil hidden @_T015nested_generics4DeliC9PepperoniCAEyx_Gycfc : $@convention(method) (@owned Deli.Pepperoni) -> @owned Deli.Pepperoni // Typealiases referencing outer generic parameters @@ -90,7 +90,7 @@ class HotDogs { // Local type in extension of type in another module extension String { func foo() { - // CHECK-LABEL: // (extension in nested_generics):Swift.String.(foo () -> ()).(Cheese #1).init (material : A) -> (extension in nested_generics):Swift.String.(foo () -> ()).(Cheese #1) + // CHECK-LABEL: // init(material: A) -> Cheese #1 in (extension in nested_generics):Swift.String.foo() -> () in Cheese #1 in (extension in nested_generics):Swift.String.foo() -> () // CHECK-LABEL: sil private @_T0SS15nested_genericsE3fooyyF6CheeseL_VADyxGx8material_tcfC struct Cheese { let material: Milk @@ -102,7 +102,7 @@ extension String { // Local type in extension of type in same module extension HotDogs { func applyRelish() { - // CHECK-LABEL: // nested_generics.HotDogs.(applyRelish () -> ()).(Relish #1).init (material : A) -> nested_generics.HotDogs.(applyRelish () -> ()).(Relish #1) + // CHECK-LABEL: // init(material: A) -> Relish #1 in nested_generics.HotDogs.applyRelish() -> () in Relish #1 in nested_generics.HotDogs.applyRelish() -> () // CHECK-LABEL: sil private @_T015nested_generics7HotDogsC11applyRelishyyF0F0L_VAFyxGx8material_tcfC struct Relish { @@ -115,7 +115,7 @@ extension HotDogs { struct Pepper {} struct ChiliFlakes {} -// CHECK-LABEL: // nested_generics.eatDinnerGeneric .Mustard> (d : inout nested_generics.Lunch.Dinner, t : A.Topping, u : nested_generics.Deli.Mustard) -> () +// CHECK-LABEL: // nested_generics.eatDinnerGeneric.Mustard>(d: inout nested_generics.Lunch.Dinner, t: A.Topping, u: nested_generics.Deli.Mustard) -> () // CHECK-LABEL: sil hidden @_T015nested_generics16eatDinnerGenericyAA5LunchV0D0Vyx_q_Gz1d_7ToppingQz1tAA4DeliC7MustardOyAA6PepperV_G1utAA5PizzaRzAA6HotDogR_AA9CuredMeatAJRQAR9CondimentRt_r0_lF : $@convention(thin) .Mustard> (@inout Lunch.Dinner, @in T.Topping, Deli.Mustard) -> () func eatDinnerGeneric(d: inout Lunch.Dinner, t: T.Topping, u: U.Condiment) { @@ -134,7 +134,7 @@ func eatDinnerGeneric(d: inout Lunch.Dinner, t: T.Topping, u: U.Cond // Overloading concrete function with different bound generic arguments in parent type -// CHECK-LABEL: // nested_generics.eatDinnerConcrete (d : inout nested_generics.Lunch.NewYork>.Dinner, t : nested_generics.Deli.Pepperoni, u : nested_generics.Deli.Mustard) -> () +// CHECK-LABEL: // nested_generics.eatDinnerConcrete(d: inout nested_generics.Lunch.NewYork>.Dinner, t: nested_generics.Deli.Pepperoni, u: nested_generics.Deli.Mustard) -> () // CHECK-LABEL: sil hidden @_T015nested_generics17eatDinnerConcreteyAA5LunchV0D0VyAA6PizzasV7NewYorkCyAA11ChiliFlakesV_G_AA7HotDogsC8AmericanVGz1d_AA4DeliC9PepperoniCyAL_G1tAU7MustardOyAA6PepperV_G1utF : $@convention(thin) (@inout Lunch.NewYork>.Dinner, @owned Deli.Pepperoni, Deli.Mustard) -> () func eatDinnerConcrete(d: inout Lunch.NewYork>.Dinner, @@ -156,7 +156,7 @@ func eatDinnerConcrete(d: inout Lunch.NewYork>.Dinner.NewYork) -> (@out nested_generics.HotDogs.American) to @callee_owned (@owned nested_generics.Pizzas.NewYork) -> (@unowned nested_generics.HotDogs.American) // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T015nested_generics6PizzasV7NewYorkCyAA11ChiliFlakesV_GAA7HotDogsC8AmericanVIxxr_AhLIxxd_TR : $@convention(thin) (@owned Pizzas.NewYork, @owned @callee_owned (@owned Pizzas.NewYork) -> @out HotDogs.American) -> HotDogs.American -// CHECK-LABEL: // nested_generics.eatDinnerConcrete (d : inout nested_generics.Lunch.NewYork>.Dinner, t : nested_generics.Deli.Pepperoni, u : nested_generics.Deli.Mustard) -> () +// CHECK-LABEL: // nested_generics.eatDinnerConcrete(d: inout nested_generics.Lunch.NewYork>.Dinner, t: nested_generics.Deli.Pepperoni, u: nested_generics.Deli.Mustard) -> () // CHECK-LABEL: sil hidden @_T015nested_generics17eatDinnerConcreteyAA5LunchV0D0VyAA6PizzasV7NewYorkCyAA6PepperV_G_AA7HotDogsC8AmericanVGz1d_AA4DeliC9PepperoniCyAL_G1tAU7MustardOyAL_G1utF : $@convention(thin) (@inout Lunch.NewYork>.Dinner, @owned Deli.Pepperoni, Deli.Mustard) -> () func eatDinnerConcrete(d: inout Lunch.NewYork>.Dinner, @@ -178,7 +178,7 @@ func eatDinnerConcrete(d: inout Lunch.NewYork>.Dinner.NewYork) -> (@out nested_generics.HotDogs.American) to @callee_owned (@owned nested_generics.Pizzas.NewYork) -> (@unowned nested_generics.HotDogs.American) // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T015nested_generics6PizzasV7NewYorkCyAA6PepperV_GAA7HotDogsC8AmericanVIxxr_AhLIxxd_TR : $@convention(thin) (@owned Pizzas.NewYork, @owned @callee_owned (@owned Pizzas.NewYork) -> @out HotDogs.American) -> HotDogs.American -// CHECK-LABEL: // nested_generics.(calls () -> ()).(closure #1) +// CHECK-LABEL: // closure #1 (nested_generics.Pizzas.NewYork) -> nested_generics.HotDogs.American in nested_generics.calls() -> () // CHECK-LABEL: sil private @_T015nested_generics5callsyyFAA7HotDogsC8AmericanVAA6PizzasV7NewYorkCyAA6PepperV_GcfU_ : $@convention(thin) (@owned Pizzas.NewYork) -> HotDogs.American func calls() { diff --git a/test/SILGen/properties.swift b/test/SILGen/properties.swift index 70d2a73e45ee6..45c25ccc3c7e0 100644 --- a/test/SILGen/properties.swift +++ b/test/SILGen/properties.swift @@ -488,7 +488,7 @@ struct DidSetWillSetTests: ForceAccessors { takeInt(newA) - // CHECK-NEXT: // function_ref properties.takeInt (Swift.Int) -> () + // CHECK-NEXT: // function_ref properties.takeInt(Swift.Int) -> () // CHECK-NEXT: [[TAKEINTFN:%.*]] = function_ref @_T010properties7takeInt{{[_0-9a-zA-Z]*}}F // CHECK-NEXT: apply [[TAKEINTFN]](%0) : $@convention(thin) (Int) -> () } @@ -502,7 +502,7 @@ struct DidSetWillSetTests: ForceAccessors { takeInt(a) - // CHECK-NEXT: // function_ref properties.takeInt (Swift.Int) -> () + // CHECK-NEXT: // function_ref properties.takeInt(Swift.Int) -> () // CHECK-NEXT: [[TAKEINTFN:%.*]] = function_ref @_T010properties7takeInt{{[_0-9a-zA-Z]*}}F // CHECK-NEXT: [[AADDR:%.*]] = struct_element_addr %1 : $*DidSetWillSetTests, #DidSetWillSetTests.a // CHECK-NEXT: [[A:%.*]] = load [trivial] [[AADDR]] : $*Int @@ -680,7 +680,7 @@ func propertyWithDidSetTakingOldValue() { p = zero } -// CHECK: // properties.(propertyWithDidSetTakingOldValue () -> ()).(p #1).setter : Swift.Int +// CHECK: // setter of p #1 : Swift.Int in properties.propertyWithDidSetTakingOldValue() // CHECK-NEXT: sil {{.*}} @_T010properties32propertyWithDidSetTakingOldValueyyF1pL_Sifs // CHECK: bb0([[ARG1:%.*]] : $Int, [[ARG2:%.*]] : ${ var Int }): // CHECK-NEXT: debug_value [[ARG1]] : $Int, let, name "newValue", argno 1 diff --git a/test/SILGen/statements.swift b/test/SILGen/statements.swift index ab255e9e5789b..3578081c6d83a 100644 --- a/test/SILGen/statements.swift +++ b/test/SILGen/statements.swift @@ -552,7 +552,7 @@ func testRequireExprPattern(_ a : Int) { // CHECK: [[M1:%[0-9]+]] = function_ref @_T010statements8marker_1yyF : $@convention(thin) () -> () // CHECK-NEXT: apply [[M1]]() : $@convention(thin) () -> () - // CHECK: function_ref Swift.~= infix (A, A) -> Swift.Bool + // CHECK: function_ref Swift.~= infix(A, A) -> Swift.Bool // CHECK: cond_br {{.*}}, bb1, bb2 guard case 4 = a else { marker_2(); return } @@ -593,7 +593,7 @@ func testRequireOptional1(_ a : Int?) -> Int { guard let t = a else { abort() } // CHECK: [[ABORT]]: - // CHECK-NEXT: // function_ref statements.abort () -> Swift.Never + // CHECK-NEXT: // function_ref statements.abort() -> Swift.Never // CHECK-NEXT: [[FUNC_REF:%.*]] = function_ref @_T010statements5aborts5NeverOyF // CHECK-NEXT: apply [[FUNC_REF]]() : $@convention(thin) () -> Never // CHECK-NEXT: unreachable @@ -626,7 +626,7 @@ func testRequireOptional2(_ a : String?) -> String { // CHECK-NEXT: return [[RETURN]] : $String // CHECK: [[ABORT_BB]]: - // CHECK-NEXT: // function_ref statements.abort () -> Swift.Never + // CHECK-NEXT: // function_ref statements.abort() -> Swift.Never // CHECK-NEXT: [[ABORT_FUNC:%.*]] = function_ref @_T010statements5aborts5NeverOyF // CHECK-NEXT: [[NEVER:%.*]] = apply [[ABORT_FUNC]]() // CHECK-NEXT: unreachable diff --git a/test/SILGen/vtable_thunks_reabstraction.swift b/test/SILGen/vtable_thunks_reabstraction.swift index 12ce0dd83b58c..5a5fa7f125d7f 100644 --- a/test/SILGen/vtable_thunks_reabstraction.swift +++ b/test/SILGen/vtable_thunks_reabstraction.swift @@ -163,16 +163,16 @@ class Opaque { } // CHECK-LABEL: sil_vtable Opaque { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC8inAndOutxx1x_tF // Opaque.inAndOut(x : A) -> A -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric (x : A, y : A1) -> A1 -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x : A.Type) -> A.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : _T027vtable_thunks_reabstraction6OpaqueC18variantOptionalityxSgx1x_tF // Opaque.variantOptionality(x : A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x : A.Type) -> A.Type? -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction6OpaqueCACyxGycfc // Opaque.init() -> Opaque +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC8inAndOutxx1x_tF // Opaque.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : _T027vtable_thunks_reabstraction6OpaqueC18variantOptionalityxSgx1x_tF // Opaque.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction6OpaqueCACyxGycfc // Opaque.init() // CHECK-NEXT: #Opaque.deinit!deallocator: _T027vtable_thunks_reabstraction6OpaqueCfD // Opaque.__deallocating_deinit // CHECK-NEXT: } @@ -181,20 +181,20 @@ class StillOpaque: Opaque { } // CHECK-LABEL: sil_vtable StillOpaque { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC8inAndOutxx1x_tF // Opaque.inAndOut(x : A) -> A -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric (x : A, y : A1) -> A1 -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x : A.Type) -> A.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : _T027vtable_thunks_reabstraction6OpaqueC18variantOptionalityxSgx1x_tF // Opaque.variantOptionality(x : A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x : A.Type) -> A.Type? -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : hidden _T027vtable_thunks_reabstraction11StillOpaqueC24variantOptionalityTuplesx_xm_xxcttx_xm_xxcttSg1x_tFAA0E0CAdEx_xm_xxcttAF_tFTV // vtable thunk for Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? dispatching to StillOpaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))?) -> (A, (A.Type, (A) -> A)) -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction11StillOpaqueCACyxGycfc // StillOpaque.init() -> StillOpaque +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC8inAndOutxx1x_tF // Opaque.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : _T027vtable_thunks_reabstraction6OpaqueC18variantOptionalityxSgx1x_tF // Opaque.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : hidden _T027vtable_thunks_reabstraction11StillOpaqueC24variantOptionalityTuplesx_xm_xxcttx_xm_xxcttSg1x_tFAA0E0CAdEx_xm_xxcttAF_tFTV // vtable thunk for Opaque.variantOptionalityTuples(x:) dispatching to StillOpaque.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction11StillOpaqueCACyxGycfc // StillOpaque.init() // Tuple becomes more optional -- needs new vtable entry -// CHECK-NEXT: #StillOpaque.variantOptionalityTuples!1: (StillOpaque) -> ((T, (T.Type, (T) -> T))?) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction11StillOpaqueC24variantOptionalityTuplesx_xm_xxcttx_xm_xxcttSg1x_tF // StillOpaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))?) -> (A, (A.Type, (A) -> A)) +// CHECK-NEXT: #StillOpaque.variantOptionalityTuples!1: (StillOpaque) -> ((T, (T.Type, (T) -> T))?) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction11StillOpaqueC24variantOptionalityTuplesx_xm_xxcttx_xm_xxcttSg1x_tF // StillOpaque.variantOptionalityTuples(x:) // CHECK-NEXT: #StillOpaque.deinit!deallocator: _T027vtable_thunks_reabstraction11StillOpaqueCfD // StillOpaque.__deallocating_deinit // CHECK-NEXT: } @@ -212,23 +212,23 @@ class ConcreteValue: Opaque { } // CHECK-LABEL: sil_vtable ConcreteValue { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction13ConcreteValueC8inAndOutAA1SVAF1x_tFAA6OpaqueCADxxAG_tFTV // vtable thunk for Opaque.inAndOut(x : A) -> A dispatching to ConcreteValue.inAndOut(x : S) -> S -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : hidden _T027vtable_thunks_reabstraction13ConcreteValueC15inAndOutGenericxAA1SV1x_x1ytlFAA6OpaqueCADqd__xAG_qd__AHtlFTV // vtable thunk for Opaque.inAndOutGeneric (x : A, y : A1) -> A1 dispatching to ConcreteValue.inAndOutGeneric (x : S, y : A) -> A -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : hidden _T027vtable_thunks_reabstraction13ConcreteValueC17inAndOutMetatypesAA1SVmAFm1x_tFAA6OpaqueCADxmxmAG_tFTV // vtable thunk for Opaque.inAndOutMetatypes(x : A.Type) -> A.Type dispatching to ConcreteValue.inAndOutMetatypes(x : S.Type) -> S.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : hidden _T027vtable_thunks_reabstraction13ConcreteValueC17inAndOutFunctionsAA1SVAFcA2Fc1x_tFAA6OpaqueCADxxcxxcAG_tFTV // vtable thunk for Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A dispatching to ConcreteValue.inAndOutFunctions(x : (S) -> S) -> (S) -> S -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : hidden _T027vtable_thunks_reabstraction13ConcreteValueC14inAndOutTuplesAA1SV_AFm_A2FcttAF_AFm_A2Fctt1x_tFAA6OpaqueCADx_xm_xxcttx_xm_xxcttAG_tFTV // vtable thunk for Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) dispatching to ConcreteValue.inAndOutTuples(x : (S, (S.Type, (S) -> S))) -> (S, (S.Type, (S) -> S)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction13ConcreteValueC18variantOptionalityAA1SVAFSg1x_tFAA6OpaqueCADxSgxAH_tFTV // vtable thunk for Opaque.variantOptionality(x : A) -> A? dispatching to ConcreteValue.variantOptionality(x : S?) -> S -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : hidden _T027vtable_thunks_reabstraction13ConcreteValueC27variantOptionalityMetatypesAA1SVmAFmSg1x_tFAA6OpaqueCADxmSgxmAH_tFTV // vtable thunk for Opaque.variantOptionalityMetatypes(x : A.Type) -> A.Type? dispatching to ConcreteValue.variantOptionalityMetatypes(x : S.Type?) -> S.Type -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : hidden _T027vtable_thunks_reabstraction13ConcreteValueC27variantOptionalityFunctionsAA1SVAFcA2FcSg1x_tFAA6OpaqueCADxxcSgxxcAH_tFTV // vtable thunk for Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? dispatching to ConcreteValue.variantOptionalityFunctions(x : (S) -> S?) -> (S) -> S -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : hidden _T027vtable_thunks_reabstraction13ConcreteValueC24variantOptionalityTuplesAA1SV_AFm_A2FcttAF_AFm_A2FcttSg1x_tFAA6OpaqueCADx_xm_xxcttSgx_xm_xxcttAH_tFTV // vtable thunk for Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? dispatching to ConcreteValue.variantOptionalityTuples(x : (S, (S.Type, (S) -> S))?) -> (S, (S.Type, (S) -> S)) -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction13ConcreteValueCACycfc // ConcreteValue.init() -> ConcreteValue +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction13ConcreteValueC8inAndOutAA1SVAF1x_tFAA6OpaqueCADxxAG_tFTV // vtable thunk for Opaque.inAndOut(x:) dispatching to ConcreteValue.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : hidden _T027vtable_thunks_reabstraction13ConcreteValueC15inAndOutGenericxAA1SV1x_x1ytlFAA6OpaqueCADqd__xAG_qd__AHtlFTV // vtable thunk for Opaque.inAndOutGeneric(x:y:) dispatching to ConcreteValue.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : hidden _T027vtable_thunks_reabstraction13ConcreteValueC17inAndOutMetatypesAA1SVmAFm1x_tFAA6OpaqueCADxmxmAG_tFTV // vtable thunk for Opaque.inAndOutMetatypes(x:) dispatching to ConcreteValue.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : hidden _T027vtable_thunks_reabstraction13ConcreteValueC17inAndOutFunctionsAA1SVAFcA2Fc1x_tFAA6OpaqueCADxxcxxcAG_tFTV // vtable thunk for Opaque.inAndOutFunctions(x:) dispatching to ConcreteValue.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : hidden _T027vtable_thunks_reabstraction13ConcreteValueC14inAndOutTuplesAA1SV_AFm_A2FcttAF_AFm_A2Fctt1x_tFAA6OpaqueCADx_xm_xxcttx_xm_xxcttAG_tFTV // vtable thunk for Opaque.inAndOutTuples(x:) dispatching to ConcreteValue.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction13ConcreteValueC18variantOptionalityAA1SVAFSg1x_tFAA6OpaqueCADxSgxAH_tFTV // vtable thunk for Opaque.variantOptionality(x:) dispatching to ConcreteValue.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : hidden _T027vtable_thunks_reabstraction13ConcreteValueC27variantOptionalityMetatypesAA1SVmAFmSg1x_tFAA6OpaqueCADxmSgxmAH_tFTV // vtable thunk for Opaque.variantOptionalityMetatypes(x:) dispatching to ConcreteValue.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : hidden _T027vtable_thunks_reabstraction13ConcreteValueC27variantOptionalityFunctionsAA1SVAFcA2FcSg1x_tFAA6OpaqueCADxxcSgxxcAH_tFTV // vtable thunk for Opaque.variantOptionalityFunctions(x:) dispatching to ConcreteValue.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : hidden _T027vtable_thunks_reabstraction13ConcreteValueC24variantOptionalityTuplesAA1SV_AFm_A2FcttAF_AFm_A2FcttSg1x_tFAA6OpaqueCADx_xm_xxcttSgx_xm_xxcttAH_tFTV // vtable thunk for Opaque.variantOptionalityTuples(x:) dispatching to ConcreteValue.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction13ConcreteValueCACycfc // ConcreteValue.init() // Value types becoming more optional -- needs new vtable entry -// CHECK-NEXT: #ConcreteValue.variantOptionality!1: (ConcreteValue) -> (S?) -> S : _T027vtable_thunks_reabstraction13ConcreteValueC18variantOptionalityAA1SVAFSg1x_tF // ConcreteValue.variantOptionality(x : S?) -> S -// CHECK-NEXT: #ConcreteValue.variantOptionalityMetatypes!1: (ConcreteValue) -> (S.Type?) -> S.Type : _T027vtable_thunks_reabstraction13ConcreteValueC27variantOptionalityMetatypesAA1SVmAFmSg1x_tF // ConcreteValue.variantOptionalityMetatypes(x : S.Type?) -> S.Type -// CHECK-NEXT: #ConcreteValue.variantOptionalityFunctions!1: (ConcreteValue) -> (((S) -> S)?) -> (S) -> S : _T027vtable_thunks_reabstraction13ConcreteValueC27variantOptionalityFunctionsAA1SVAFcA2FcSg1x_tF // ConcreteValue.variantOptionalityFunctions(x : (S) -> S?) -> (S) -> S -// CHECK-NEXT: #ConcreteValue.variantOptionalityTuples!1: (ConcreteValue) -> ((S, (S.Type, (S) -> S))?) -> (S, (S.Type, (S) -> S)) : _T027vtable_thunks_reabstraction13ConcreteValueC24variantOptionalityTuplesAA1SV_AFm_A2FcttAF_AFm_A2FcttSg1x_tF // ConcreteValue.variantOptionalityTuples(x : (S, (S.Type, (S) -> S))?) -> (S, (S.Type, (S) -> S)) +// CHECK-NEXT: #ConcreteValue.variantOptionality!1: (ConcreteValue) -> (S?) -> S : _T027vtable_thunks_reabstraction13ConcreteValueC18variantOptionalityAA1SVAFSg1x_tF // ConcreteValue.variantOptionality(x:) +// CHECK-NEXT: #ConcreteValue.variantOptionalityMetatypes!1: (ConcreteValue) -> (S.Type?) -> S.Type : _T027vtable_thunks_reabstraction13ConcreteValueC27variantOptionalityMetatypesAA1SVmAFmSg1x_tF // ConcreteValue.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #ConcreteValue.variantOptionalityFunctions!1: (ConcreteValue) -> (((S) -> S)?) -> (S) -> S : _T027vtable_thunks_reabstraction13ConcreteValueC27variantOptionalityFunctionsAA1SVAFcA2FcSg1x_tF // ConcreteValue.variantOptionalityFunctions(x:) +// CHECK-NEXT: #ConcreteValue.variantOptionalityTuples!1: (ConcreteValue) -> ((S, (S.Type, (S) -> S))?) -> (S, (S.Type, (S) -> S)) : _T027vtable_thunks_reabstraction13ConcreteValueC24variantOptionalityTuplesAA1SV_AFm_A2FcttAF_AFm_A2FcttSg1x_tF // ConcreteValue.variantOptionalityTuples(x:) // CHECK-NEXT: #ConcreteValue.deinit!deallocator: _T027vtable_thunks_reabstraction13ConcreteValueCfD // ConcreteValue.__deallocating_deinit // CHECK-NEXT: } @@ -245,16 +245,16 @@ class ConcreteClass: Opaque { } // CHECK-LABEL: sil_vtable ConcreteClass { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction13ConcreteClassC8inAndOutAA1CCAF1x_tFAA6OpaqueCADxxAG_tFTV // vtable thunk for Opaque.inAndOut(x : A) -> A dispatching to ConcreteClass.inAndOut(x : C) -> C -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric (x : A, y : A1) -> A1 -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction13ConcreteClassC17inAndOutMetatypesAA1CCmAFm1x_tF // ConcreteClass.inAndOutMetatypes(x : C.Type) -> C.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : hidden _T027vtable_thunks_reabstraction13ConcreteClassC17inAndOutFunctionsAA1CCAFcA2Fc1x_tFAA6OpaqueCADxxcxxcAG_tFTV // vtable thunk for Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A dispatching to ConcreteClass.inAndOutFunctions(x : (C) -> C) -> (C) -> C -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : hidden _T027vtable_thunks_reabstraction13ConcreteClassC14inAndOutTuplesAA1CC_AFm_A2FcttAF_AFm_A2Fctt1x_tFAA6OpaqueCADx_xm_xxcttx_xm_xxcttAG_tFTV // vtable thunk for Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) dispatching to ConcreteClass.inAndOutTuples(x : (C, (C.Type, (C) -> C))) -> (C, (C.Type, (C) -> C)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction13ConcreteClassC18variantOptionalityAA1CCAFSg1x_tFAA6OpaqueCADxSgxAH_tFTV // vtable thunk for Opaque.variantOptionality(x : A) -> A? dispatching to ConcreteClass.variantOptionality(x : C?) -> C -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction13ConcreteClassC27variantOptionalityMetatypesAA1CCmAFmSg1x_tF // ConcreteClass.variantOptionalityMetatypes(x : C.Type?) -> C.Type -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : hidden _T027vtable_thunks_reabstraction13ConcreteClassC27variantOptionalityFunctionsAA1CCAFcA2FcSg1x_tFAA6OpaqueCADxxcSgxxcAH_tFTV // vtable thunk for Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? dispatching to ConcreteClass.variantOptionalityFunctions(x : (C) -> C?) -> (C) -> C -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : hidden _T027vtable_thunks_reabstraction13ConcreteClassC24variantOptionalityTuplesAA1CC_AFm_A2FcttAF_AFm_A2FcttSg1x_tFAA6OpaqueCADx_xm_xxcttSgx_xm_xxcttAH_tFTV // vtable thunk for Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? dispatching to ConcreteClass.variantOptionalityTuples(x : (C, (C.Type, (C) -> C))?) -> (C, (C.Type, (C) -> C)) -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction13ConcreteClassCACycfc // ConcreteClass.init() -> ConcreteClass +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction13ConcreteClassC8inAndOutAA1CCAF1x_tFAA6OpaqueCADxxAG_tFTV // vtable thunk for Opaque.inAndOut(x:) dispatching to ConcreteClass.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction13ConcreteClassC17inAndOutMetatypesAA1CCmAFm1x_tF // ConcreteClass.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : hidden _T027vtable_thunks_reabstraction13ConcreteClassC17inAndOutFunctionsAA1CCAFcA2Fc1x_tFAA6OpaqueCADxxcxxcAG_tFTV // vtable thunk for Opaque.inAndOutFunctions(x:) dispatching to ConcreteClass.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : hidden _T027vtable_thunks_reabstraction13ConcreteClassC14inAndOutTuplesAA1CC_AFm_A2FcttAF_AFm_A2Fctt1x_tFAA6OpaqueCADx_xm_xxcttx_xm_xxcttAG_tFTV // vtable thunk for Opaque.inAndOutTuples(x:) dispatching to ConcreteClass.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction13ConcreteClassC18variantOptionalityAA1CCAFSg1x_tFAA6OpaqueCADxSgxAH_tFTV // vtable thunk for Opaque.variantOptionality(x:) dispatching to ConcreteClass.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction13ConcreteClassC27variantOptionalityMetatypesAA1CCmAFmSg1x_tF // ConcreteClass.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : hidden _T027vtable_thunks_reabstraction13ConcreteClassC27variantOptionalityFunctionsAA1CCAFcA2FcSg1x_tFAA6OpaqueCADxxcSgxxcAH_tFTV // vtable thunk for Opaque.variantOptionalityFunctions(x:) dispatching to ConcreteClass.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : hidden _T027vtable_thunks_reabstraction13ConcreteClassC24variantOptionalityTuplesAA1CC_AFm_A2FcttAF_AFm_A2FcttSg1x_tFAA6OpaqueCADx_xm_xxcttSgx_xm_xxcttAH_tFTV // vtable thunk for Opaque.variantOptionalityTuples(x:) dispatching to ConcreteClass.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction13ConcreteClassCACycfc // ConcreteClass.init() // Class references are ABI-compatible with optional class references, and // similarly for class metatypes. @@ -262,8 +262,8 @@ class ConcreteClass: Opaque { // Function and tuple optionality change still needs a new vtable entry // as above. -// CHECK-NEXT: #ConcreteClass.variantOptionalityFunctions!1: (ConcreteClass) -> (((C) -> C)?) -> (C) -> C : _T027vtable_thunks_reabstraction13ConcreteClassC27variantOptionalityFunctionsAA1CCAFcA2FcSg1x_tF // ConcreteClass.variantOptionalityFunctions(x : (C) -> C?) -> (C) -> C -// CHECK-NEXT: #ConcreteClass.variantOptionalityTuples!1: (ConcreteClass) -> ((C, (C.Type, (C) -> C))?) -> (C, (C.Type, (C) -> C)) : _T027vtable_thunks_reabstraction13ConcreteClassC24variantOptionalityTuplesAA1CC_AFm_A2FcttAF_AFm_A2FcttSg1x_tF // ConcreteClass.variantOptionalityTuples(x : (C, (C.Type, (C) -> C))?) -> (C, (C.Type, (C) -> C)) +// CHECK-NEXT: #ConcreteClass.variantOptionalityFunctions!1: (ConcreteClass) -> (((C) -> C)?) -> (C) -> C : _T027vtable_thunks_reabstraction13ConcreteClassC27variantOptionalityFunctionsAA1CCAFcA2FcSg1x_tF // ConcreteClass.variantOptionalityFunctions(x:) +// CHECK-NEXT: #ConcreteClass.variantOptionalityTuples!1: (ConcreteClass) -> ((C, (C.Type, (C) -> C))?) -> (C, (C.Type, (C) -> C)) : _T027vtable_thunks_reabstraction13ConcreteClassC24variantOptionalityTuplesAA1CC_AFm_A2FcttAF_AFm_A2FcttSg1x_tF // ConcreteClass.variantOptionalityTuples(x:) // CHECK-NEXT: #ConcreteClass.deinit!deallocator: _T027vtable_thunks_reabstraction13ConcreteClassCfD // ConcreteClass.__deallocating_deinit // CHECK-NEXT: } @@ -274,16 +274,16 @@ class ConcreteClassVariance: Opaque { } // CHECK-LABEL: sil_vtable ConcreteClassVariance { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction21ConcreteClassVarianceC8inAndOutAA1DCAA1BC1x_tFAA6OpaqueCADxxAI_tFTV // vtable thunk for Opaque.inAndOut(x : A) -> A dispatching to ConcreteClassVariance.inAndOut(x : B) -> D -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric (x : A, y : A1) -> A1 -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x : A.Type) -> A.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction21ConcreteClassVarianceC18variantOptionalityAA1DCAA1BCSg1x_tFAA6OpaqueCADxSgxAJ_tFTV // vtable thunk for Opaque.variantOptionality(x : A) -> A? dispatching to ConcreteClassVariance.variantOptionality(x : B?) -> D -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x : A.Type) -> A.Type? -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction21ConcreteClassVarianceCACycfc // ConcreteClassVariance.init() -> ConcreteClassVariance +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction21ConcreteClassVarianceC8inAndOutAA1DCAA1BC1x_tFAA6OpaqueCADxxAI_tFTV // vtable thunk for Opaque.inAndOut(x:) dispatching to ConcreteClassVariance.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction21ConcreteClassVarianceC18variantOptionalityAA1DCAA1BCSg1x_tFAA6OpaqueCADxSgxAJ_tFTV // vtable thunk for Opaque.variantOptionality(x:) dispatching to ConcreteClassVariance.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction21ConcreteClassVarianceCACycfc // ConcreteClassVariance.init() // No new vtable entries -- class references are ABI compatible with // optional class references. @@ -297,20 +297,20 @@ class OpaqueTuple: Opaque<(U, U)> { } // CHECK-LABEL: sil_vtable OpaqueTuple { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction11OpaqueTupleC8inAndOutx_xtx_xt1x_tFAA0D0CADxxAE_tFTV // vtable thunk for Opaque.inAndOut(x : A) -> A dispatching to OpaqueTuple.inAndOut(x : (A, A)) -> (A, A) -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric (x : A, y : A1) -> A1 -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x : A.Type) -> A.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction11OpaqueTupleC18variantOptionalityx_xtx_xtSg1x_tFAA0D0CADxSgxAF_tFTV // vtable thunk for Opaque.variantOptionality(x : A) -> A? dispatching to OpaqueTuple.variantOptionality(x : (A, A)?) -> (A, A) -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x : A.Type) -> A.Type? -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction11OpaqueTupleCACyxGycfc // OpaqueTuple.init() -> OpaqueTuple +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction11OpaqueTupleC8inAndOutx_xtx_xt1x_tFAA0D0CADxxAE_tFTV // vtable thunk for Opaque.inAndOut(x:) dispatching to OpaqueTuple.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction11OpaqueTupleC18variantOptionalityx_xtx_xtSg1x_tFAA0D0CADxSgxAF_tFTV // vtable thunk for Opaque.variantOptionality(x:) dispatching to OpaqueTuple.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction11OpaqueTupleCACyxGycfc // OpaqueTuple.init() // Optionality change of tuple. -// CHECK-NEXT: #OpaqueTuple.variantOptionality!1: (OpaqueTuple) -> ((U, U)?) -> (U, U) : _T027vtable_thunks_reabstraction11OpaqueTupleC18variantOptionalityx_xtx_xtSg1x_tF // OpaqueTuple.variantOptionality(x : (A, A)?) -> (A, A) +// CHECK-NEXT: #OpaqueTuple.variantOptionality!1: (OpaqueTuple) -> ((U, U)?) -> (U, U) : _T027vtable_thunks_reabstraction11OpaqueTupleC18variantOptionalityx_xtx_xtSg1x_tF // OpaqueTuple.variantOptionality(x:) // CHECK-NEXT: #OpaqueTuple.deinit!deallocator: _T027vtable_thunks_reabstraction11OpaqueTupleCfD // OpaqueTuple.__deallocating_deinit // CHECK-NEXT: } @@ -321,20 +321,20 @@ class ConcreteTuple: Opaque<(S, S)> { } // CHECK-LABEL: sil_vtable ConcreteTuple { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction13ConcreteTupleC8inAndOutAA1SV_AFtAF_AFt1x_tFAA6OpaqueCADxxAG_tFTV // vtable thunk for Opaque.inAndOut(x : A) -> A dispatching to ConcreteTuple.inAndOut(x : (S, S)) -> (S, S) -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric (x : A, y : A1) -> A1 -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x : A.Type) -> A.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction13ConcreteTupleC18variantOptionalityAA1SV_AFtAF_AFtSg1x_tFAA6OpaqueCADxSgxAH_tFTV // vtable thunk for Opaque.variantOptionality(x : A) -> A? dispatching to ConcreteTuple.variantOptionality(x : (S, S)?) -> (S, S) -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x : A.Type) -> A.Type? -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction13ConcreteTupleCACycfc // ConcreteTuple.init() -> ConcreteTuple +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction13ConcreteTupleC8inAndOutAA1SV_AFtAF_AFt1x_tFAA6OpaqueCADxxAG_tFTV // vtable thunk for Opaque.inAndOut(x:) dispatching to ConcreteTuple.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction13ConcreteTupleC18variantOptionalityAA1SV_AFtAF_AFtSg1x_tFAA6OpaqueCADxSgxAH_tFTV // vtable thunk for Opaque.variantOptionality(x:) dispatching to ConcreteTuple.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction13ConcreteTupleCACycfc // ConcreteTuple.init() // Optionality change of tuple. -// CHECK-NEXT: #ConcreteTuple.variantOptionality!1: (ConcreteTuple) -> ((S, S)?) -> (S, S) : _T027vtable_thunks_reabstraction13ConcreteTupleC18variantOptionalityAA1SV_AFtAF_AFtSg1x_tF // ConcreteTuple.variantOptionality(x : (S, S)?) -> (S, S) +// CHECK-NEXT: #ConcreteTuple.variantOptionality!1: (ConcreteTuple) -> ((S, S)?) -> (S, S) : _T027vtable_thunks_reabstraction13ConcreteTupleC18variantOptionalityAA1SV_AFtAF_AFtSg1x_tF // ConcreteTuple.variantOptionality(x:) // CHECK-NEXT: #ConcreteTuple.deinit!deallocator: _T027vtable_thunks_reabstraction13ConcreteTupleCfD // ConcreteTuple.__deallocating_deinit // CHECK-NEXT: } @@ -345,20 +345,20 @@ class OpaqueFunction: Opaque<(U) -> V> { } // CHECK-LABEL: sil_vtable OpaqueFunction { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction14OpaqueFunctionC8inAndOutq_xcq_xc1x_tFAA0D0CADxxAE_tFTV // vtable thunk for Opaque.inAndOut(x : A) -> A dispatching to OpaqueFunction.inAndOut(x : (A) -> B) -> (A) -> B -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric (x : A, y : A1) -> A1 -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x : A.Type) -> A.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction14OpaqueFunctionC18variantOptionalityq_xcq_xcSg1x_tFAA0D0CADxSgxAF_tFTV // vtable thunk for Opaque.variantOptionality(x : A) -> A? dispatching to OpaqueFunction.variantOptionality(x : (A) -> B?) -> (A) -> B -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x : A.Type) -> A.Type? -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction14OpaqueFunctionCACyxq_Gycfc // OpaqueFunction.init() -> OpaqueFunction +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction14OpaqueFunctionC8inAndOutq_xcq_xc1x_tFAA0D0CADxxAE_tFTV // vtable thunk for Opaque.inAndOut(x:) dispatching to OpaqueFunction.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction14OpaqueFunctionC18variantOptionalityq_xcq_xcSg1x_tFAA0D0CADxSgxAF_tFTV // vtable thunk for Opaque.variantOptionality(x:) dispatching to OpaqueFunction.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction14OpaqueFunctionCACyxq_Gycfc // OpaqueFunction.init() // Optionality change of function. -// CHECK-NEXT: #OpaqueFunction.variantOptionality!1: (OpaqueFunction) -> (((U) -> V)?) -> (U) -> V : _T027vtable_thunks_reabstraction14OpaqueFunctionC18variantOptionalityq_xcq_xcSg1x_tF // OpaqueFunction.variantOptionality(x : (A) -> B?) -> (A) -> B +// CHECK-NEXT: #OpaqueFunction.variantOptionality!1: (OpaqueFunction) -> (((U) -> V)?) -> (U) -> V : _T027vtable_thunks_reabstraction14OpaqueFunctionC18variantOptionalityq_xcq_xcSg1x_tF // OpaqueFunction.variantOptionality(x:) // CHECK-NEXT: #OpaqueFunction.deinit!deallocator: _T027vtable_thunks_reabstraction14OpaqueFunctionCfD // OpaqueFunction.__deallocating_deinit // CHECK-NEXT: } @@ -369,20 +369,20 @@ class ConcreteFunction: Opaque<(S) -> S> { } // CHECK-LABEL: sil_vtable ConcreteFunction { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction16ConcreteFunctionC8inAndOutAA1SVAFcA2Fc1x_tFAA6OpaqueCADxxAG_tFTV // vtable thunk for Opaque.inAndOut(x : A) -> A dispatching to ConcreteFunction.inAndOut(x : (S) -> S) -> (S) -> S -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric (x : A, y : A1) -> A1 -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x : A.Type) -> A.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction16ConcreteFunctionC18variantOptionalityAA1SVAFcA2FcSg1x_tFAA6OpaqueCADxSgxAH_tFTV // vtable thunk for Opaque.variantOptionality(x : A) -> A? dispatching to ConcreteFunction.variantOptionality(x : (S) -> S?) -> (S) -> S -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x : A.Type) -> A.Type? -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction16ConcreteFunctionCACycfc // ConcreteFunction.init() -> ConcreteFunction +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction16ConcreteFunctionC8inAndOutAA1SVAFcA2Fc1x_tFAA6OpaqueCADxxAG_tFTV // vtable thunk for Opaque.inAndOut(x:) dispatching to ConcreteFunction.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction16ConcreteFunctionC18variantOptionalityAA1SVAFcA2FcSg1x_tFAA6OpaqueCADxSgxAH_tFTV // vtable thunk for Opaque.variantOptionality(x:) dispatching to ConcreteFunction.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction16ConcreteFunctionCACycfc // ConcreteFunction.init() // Optionality change of function. -// CHECK-NEXT: #ConcreteFunction.variantOptionality!1: (ConcreteFunction) -> (((S) -> S)?) -> (S) -> S : _T027vtable_thunks_reabstraction16ConcreteFunctionC18variantOptionalityAA1SVAFcA2FcSg1x_tF // ConcreteFunction.variantOptionality(x : (S) -> S?) -> (S) -> S +// CHECK-NEXT: #ConcreteFunction.variantOptionality!1: (ConcreteFunction) -> (((S) -> S)?) -> (S) -> S : _T027vtable_thunks_reabstraction16ConcreteFunctionC18variantOptionalityAA1SVAFcA2FcSg1x_tF // ConcreteFunction.variantOptionality(x:) // CHECK-NEXT: #ConcreteFunction.deinit!deallocator: _T027vtable_thunks_reabstraction16ConcreteFunctionCfD // ConcreteFunction.__deallocating_deinit // CHECK-NEXT: } @@ -393,20 +393,20 @@ class OpaqueMetatype: Opaque { } // CHECK-LABEL: sil_vtable OpaqueMetatype { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction14OpaqueMetatypeC8inAndOutxmxm1x_tFAA0D0CADxxAE_tFTV // vtable thunk for Opaque.inAndOut(x : A) -> A dispatching to OpaqueMetatype.inAndOut(x : A.Type) -> A.Type -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric (x : A, y : A1) -> A1 -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x : A.Type) -> A.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction14OpaqueMetatypeC18variantOptionalityxmxmSg1x_tFAA0D0CADxSgxAF_tFTV // vtable thunk for Opaque.variantOptionality(x : A) -> A? dispatching to OpaqueMetatype.variantOptionality(x : A.Type?) -> A.Type -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x : A.Type) -> A.Type? -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction14OpaqueMetatypeCACyxGycfc // OpaqueMetatype.init() -> OpaqueMetatype +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction14OpaqueMetatypeC8inAndOutxmxm1x_tFAA0D0CADxxAE_tFTV // vtable thunk for Opaque.inAndOut(x:) dispatching to OpaqueMetatype.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction14OpaqueMetatypeC18variantOptionalityxmxmSg1x_tFAA0D0CADxSgxAF_tFTV // vtable thunk for Opaque.variantOptionality(x:) dispatching to OpaqueMetatype.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction14OpaqueMetatypeCACyxGycfc // OpaqueMetatype.init() // Optionality change of metatype. -// CHECK-NEXT: #OpaqueMetatype.variantOptionality!1: (OpaqueMetatype) -> (U.Type?) -> U.Type : _T027vtable_thunks_reabstraction14OpaqueMetatypeC18variantOptionalityxmxmSg1x_tF // OpaqueMetatype.variantOptionality(x : A.Type?) -> A.Type +// CHECK-NEXT: #OpaqueMetatype.variantOptionality!1: (OpaqueMetatype) -> (U.Type?) -> U.Type : _T027vtable_thunks_reabstraction14OpaqueMetatypeC18variantOptionalityxmxmSg1x_tF // OpaqueMetatype.variantOptionality(x:) // CHECK-NEXT: #OpaqueMetatype.deinit!deallocator: _T027vtable_thunks_reabstraction14OpaqueMetatypeCfD // OpaqueMetatype.__deallocating_deinit // CHECK-NEXT: } @@ -417,20 +417,20 @@ class ConcreteValueMetatype: Opaque { } // CHECK-LABEL: sil_vtable ConcreteValueMetatype { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction21ConcreteValueMetatypeC8inAndOutAA1SVmAFm1x_tFAA6OpaqueCADxxAG_tFTV // vtable thunk for Opaque.inAndOut(x : A) -> A dispatching to ConcreteValueMetatype.inAndOut(x : S.Type) -> S.Type -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric (x : A, y : A1) -> A1 -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x : A.Type) -> A.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction21ConcreteValueMetatypeC18variantOptionalityAA1SVmAFmSg1x_tFAA6OpaqueCADxSgxAH_tFTV // vtable thunk for Opaque.variantOptionality(x : A) -> A? dispatching to ConcreteValueMetatype.variantOptionality(x : S.Type?) -> S.Type -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x : A.Type) -> A.Type? -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction21ConcreteValueMetatypeCACycfc // ConcreteValueMetatype.init() -> ConcreteValueMetatype +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction21ConcreteValueMetatypeC8inAndOutAA1SVmAFm1x_tFAA6OpaqueCADxxAG_tFTV // vtable thunk for Opaque.inAndOut(x:) dispatching to ConcreteValueMetatype.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction21ConcreteValueMetatypeC18variantOptionalityAA1SVmAFmSg1x_tFAA6OpaqueCADxSgxAH_tFTV // vtable thunk for Opaque.variantOptionality(x:) dispatching to ConcreteValueMetatype.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction21ConcreteValueMetatypeCACycfc // ConcreteValueMetatype.init() // Optionality change of metatype. -// CHECK-NEXT: #ConcreteValueMetatype.variantOptionality!1: (ConcreteValueMetatype) -> (S.Type?) -> S.Type : _T027vtable_thunks_reabstraction21ConcreteValueMetatypeC18variantOptionalityAA1SVmAFmSg1x_tF // ConcreteValueMetatype.variantOptionality(x : S.Type?) -> S.Type +// CHECK-NEXT: #ConcreteValueMetatype.variantOptionality!1: (ConcreteValueMetatype) -> (S.Type?) -> S.Type : _T027vtable_thunks_reabstraction21ConcreteValueMetatypeC18variantOptionalityAA1SVmAFmSg1x_tF // ConcreteValueMetatype.variantOptionality(x:) // CHECK-NEXT: #ConcreteValueMetatype.deinit!deallocator: _T027vtable_thunks_reabstraction21ConcreteValueMetatypeCfD // ConcreteValueMetatype.__deallocating_deinit // CHECK-NEXT: } @@ -441,16 +441,16 @@ class ConcreteClassMetatype: Opaque { } // CHECK-LABEL: sil_vtable ConcreteClassMetatype { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction21ConcreteClassMetatypeC8inAndOutAA1CCmAFm1x_tFAA6OpaqueCADxxAG_tFTV // vtable thunk for Opaque.inAndOut(x : A) -> A dispatching to ConcreteClassMetatype.inAndOut(x : C.Type) -> C.Type -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric (x : A, y : A1) -> A1 -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x : A.Type) -> A.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction21ConcreteClassMetatypeC18variantOptionalityAA1CCmAFmSg1x_tFAA6OpaqueCADxSgxAH_tFTV // vtable thunk for Opaque.variantOptionality(x : A) -> A? dispatching to ConcreteClassMetatype.variantOptionality(x : C.Type?) -> C.Type -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x : A.Type) -> A.Type? -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction21ConcreteClassMetatypeCACycfc // ConcreteClassMetatype.init() -> ConcreteClassMetatype +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction21ConcreteClassMetatypeC8inAndOutAA1CCmAFm1x_tFAA6OpaqueCADxxAG_tFTV // vtable thunk for Opaque.inAndOut(x:) dispatching to ConcreteClassMetatype.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : hidden _T027vtable_thunks_reabstraction21ConcreteClassMetatypeC18variantOptionalityAA1CCmAFmSg1x_tFAA6OpaqueCADxSgxAH_tFTV // vtable thunk for Opaque.variantOptionality(x:) dispatching to ConcreteClassMetatype.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction21ConcreteClassMetatypeCACycfc // ConcreteClassMetatype.init() // Class metatypes are ABI compatible with optional class metatypes. @@ -465,16 +465,16 @@ class ConcreteOptional: Opaque { } // CHECK-LABEL: sil_vtable ConcreteOptional { -// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction16ConcreteOptionalC8inAndOutAA1SVSgAG1x_tFAA6OpaqueCADxxAH_tFTV // vtable thunk for Opaque.inAndOut(x : A) -> A dispatching to ConcreteOptional.inAndOut(x : S?) -> S? -// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric (x : A, y : A1) -> A1 -// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x : A.Type) -> A.Type -// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x : (A) -> A) -> (A) -> A -// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A)) -// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : _T027vtable_thunks_reabstraction6OpaqueC18variantOptionalityxSgx1x_tF // Opaque.variantOptionality(x : A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x : A.Type) -> A.Type? -// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x : (A) -> A) -> (A) -> A? -// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x : (A, (A.Type, (A) -> A))) -> (A, (A.Type, (A) -> A))? -// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction16ConcreteOptionalCACycfc // ConcreteOptional.init() -> ConcreteOptional +// CHECK-NEXT: #Opaque.inAndOut!1: (Opaque) -> (T) -> T : hidden _T027vtable_thunks_reabstraction16ConcreteOptionalC8inAndOutAA1SVSgAG1x_tFAA6OpaqueCADxxAH_tFTV // vtable thunk for Opaque.inAndOut(x:) dispatching to ConcreteOptional.inAndOut(x:) +// CHECK-NEXT: #Opaque.inAndOutGeneric!1: (Opaque) -> (T, U) -> U : _T027vtable_thunks_reabstraction6OpaqueC15inAndOutGenericqd__x1x_qd__1ytlF // Opaque.inAndOutGeneric(x:y:) +// CHECK-NEXT: #Opaque.inAndOutMetatypes!1: (Opaque) -> (T.Type) -> T.Type : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutMetatypesxmxm1x_tF // Opaque.inAndOutMetatypes(x:) +// CHECK-NEXT: #Opaque.inAndOutFunctions!1: (Opaque) -> (@escaping (T) -> T) -> (T) -> T : _T027vtable_thunks_reabstraction6OpaqueC17inAndOutFunctionsxxcxxc1x_tF // Opaque.inAndOutFunctions(x:) +// CHECK-NEXT: #Opaque.inAndOutTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T)) : _T027vtable_thunks_reabstraction6OpaqueC14inAndOutTuplesx_xm_xxcttx_xm_xxctt1x_tF // Opaque.inAndOutTuples(x:) +// CHECK-NEXT: #Opaque.variantOptionality!1: (Opaque) -> (T) -> T? : _T027vtable_thunks_reabstraction6OpaqueC18variantOptionalityxSgx1x_tF // Opaque.variantOptionality(x:) +// CHECK-NEXT: #Opaque.variantOptionalityMetatypes!1: (Opaque) -> (T.Type) -> T.Type? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityMetatypesxmSgxm1x_tF // Opaque.variantOptionalityMetatypes(x:) +// CHECK-NEXT: #Opaque.variantOptionalityFunctions!1: (Opaque) -> (@escaping (T) -> T) -> ((T) -> T)? : _T027vtable_thunks_reabstraction6OpaqueC27variantOptionalityFunctionsxxcSgxxc1x_tF // Opaque.variantOptionalityFunctions(x:) +// CHECK-NEXT: #Opaque.variantOptionalityTuples!1: (Opaque) -> ((T, (T.Type, (T) -> T))) -> (T, (T.Type, (T) -> T))? : _T027vtable_thunks_reabstraction6OpaqueC24variantOptionalityTuplesx_xm_xxcttSgx_xm_xxctt1x_tF // Opaque.variantOptionalityTuples(x:) +// CHECK-NEXT: #Opaque.init!initializer.1: (Opaque.Type) -> () -> Opaque : _T027vtable_thunks_reabstraction16ConcreteOptionalCACycfc // ConcreteOptional.init() // CHECK-NEXT: #ConcreteOptional.deinit!deallocator: _T027vtable_thunks_reabstraction16ConcreteOptionalCfD // ConcreteOptional.__deallocating_deinit // CHECK-NEXT: } @@ -486,8 +486,8 @@ class GenericBase { } // CHECK-LABEL: sil_vtable GenericBase { -// CHECK-NEXT: #GenericBase.doStuff!1: (GenericBase) -> (T, U) -> () : _T027vtable_thunks_reabstraction11GenericBaseC7doStuffyx1t_qd__1utlF // GenericBase.doStuff (t : A, u : A1) -> () -// CHECK-NEXT: #GenericBase.init!initializer.1: (GenericBase.Type) -> (T, U) -> GenericBase : _T027vtable_thunks_reabstraction11GenericBaseCACyxGx1t_qd__1utclufc // GenericBase.init (t : A, u : A1) -> GenericBase +// CHECK-NEXT: #GenericBase.doStuff!1: (GenericBase) -> (T, U) -> () : _T027vtable_thunks_reabstraction11GenericBaseC7doStuffyx1t_qd__1utlF // GenericBase.doStuff(t:u:) +// CHECK-NEXT: #GenericBase.init!initializer.1: (GenericBase.Type) -> (T, U) -> GenericBase : _T027vtable_thunks_reabstraction11GenericBaseCACyxGx1t_qd__1utclufc // GenericBase.init(t:u:) // CHECK-NEXT: #GenericBase.deinit!deallocator: _T027vtable_thunks_reabstraction11GenericBaseCfD // GenericBase.__deallocating_deinit // CHECK-NEXT: } @@ -501,8 +501,8 @@ class ConcreteSub : GenericBase { } // CHECK-LABEL: sil_vtable ConcreteSub { -// CHECK-NEXT: #GenericBase.doStuff!1: (GenericBase) -> (T, U) -> () : hidden _T027vtable_thunks_reabstraction11ConcreteSubC7doStuffySi1t_x1utlFAA11GenericBaseCADyxAE_qd__AFtlFTV // vtable thunk for GenericBase.doStuff (t : A, u : A1) -> () dispatching to ConcreteSub.doStuff (t : Int, u : A) -> () -// CHECK-NEXT: #GenericBase.init!initializer.1: (GenericBase.Type) -> (T, U) -> GenericBase : hidden _T027vtable_thunks_reabstraction11ConcreteSubCACSi1t_x1utclufcAA11GenericBaseCAGyxGxAD_qd__AEtclufcTV // vtable thunk for GenericBase.init (t : A, u : A1) -> GenericBase dispatching to ConcreteSub.init (t : Int, u : A) -> ConcreteSub +// CHECK-NEXT: #GenericBase.doStuff!1: (GenericBase) -> (T, U) -> () : hidden _T027vtable_thunks_reabstraction11ConcreteSubC7doStuffySi1t_x1utlFAA11GenericBaseCADyxAE_qd__AFtlFTV // vtable thunk for GenericBase.doStuff(t:u:) dispatching to ConcreteSub.doStuff(t:u:) +// CHECK-NEXT: #GenericBase.init!initializer.1: (GenericBase.Type) -> (T, U) -> GenericBase : hidden _T027vtable_thunks_reabstraction11ConcreteSubCACSi1t_x1utclufcAA11GenericBaseCAGyxGxAD_qd__AEtclufcTV // vtable thunk for GenericBase.init(t:u:) dispatching to ConcreteSub.init(t:u:) // CHECK-NEXT: #ConcreteSub.deinit!deallocator: _T027vtable_thunks_reabstraction11ConcreteSubCfD // ConcreteSub.__deallocating_deinit // CHECK-NEXT: } @@ -512,8 +512,8 @@ class ConcreteBase { } // CHECK-LABEL: sil_vtable ConcreteBase { -// CHECK-NEXT: #ConcreteBase.init!initializer.1: (ConcreteBase.Type) -> (Int, U) -> ConcreteBase : _T027vtable_thunks_reabstraction12ConcreteBaseCACSi1t_x1utclufc // ConcreteBase.init (t : Int, u : A) -> ConcreteBase -// CHECK-NEXT: #ConcreteBase.doStuff!1: (ConcreteBase) -> (Int, U) -> () : _T027vtable_thunks_reabstraction12ConcreteBaseC7doStuffySi1t_x1utlF // ConcreteBase.doStuff (t : Int, u : A) -> () +// CHECK-NEXT: #ConcreteBase.init!initializer.1: (ConcreteBase.Type) -> (Int, U) -> ConcreteBase : _T027vtable_thunks_reabstraction12ConcreteBaseCACSi1t_x1utclufc // ConcreteBase.init(t:u:) +// CHECK-NEXT: #ConcreteBase.doStuff!1: (ConcreteBase) -> (Int, U) -> () : _T027vtable_thunks_reabstraction12ConcreteBaseC7doStuffySi1t_x1utlF // ConcreteBase.doStuff(t:u:) // CHECK-NEXT: #ConcreteBase.deinit!deallocator: _T027vtable_thunks_reabstraction12ConcreteBaseCfD // ConcreteBase.__deallocating_deinit // CHECK-NEXT: } @@ -527,8 +527,8 @@ class GenericSub : ConcreteBase { } // CHECK-LABEL: sil_vtable GenericSub { -// CHECK-NEXT: #ConcreteBase.init!initializer.1: (ConcreteBase.Type) -> (Int, U) -> ConcreteBase : _T027vtable_thunks_reabstraction10GenericSubCACyxGSi1t_qd__1utclufc // GenericSub.init (t : Int, u : A1) -> GenericSub -// CHECK-NEXT: #ConcreteBase.doStuff!1: (ConcreteBase) -> (Int, U) -> () : _T027vtable_thunks_reabstraction10GenericSubC7doStuffySi1t_qd__1utlF // GenericSub.doStuff (t : Int, u : A1) -> () +// CHECK-NEXT: #ConcreteBase.init!initializer.1: (ConcreteBase.Type) -> (Int, U) -> ConcreteBase : _T027vtable_thunks_reabstraction10GenericSubCACyxGSi1t_qd__1utclufc // GenericSub.init(t:u:) +// CHECK-NEXT: #ConcreteBase.doStuff!1: (ConcreteBase) -> (Int, U) -> () : _T027vtable_thunks_reabstraction10GenericSubC7doStuffySi1t_qd__1utlF // GenericSub.doStuff(t:u:) // CHECK-NEXT: #GenericSub.deinit!deallocator: _T027vtable_thunks_reabstraction10GenericSubCfD // GenericSub.__deallocating_deinit // CHECK-NEXT: } @@ -540,8 +540,8 @@ class MoreGenericSub1 : GenericBase { } // CHECK-LABEL: sil_vtable MoreGenericSub1 { -// CHECK-NEXT: #GenericBase.doStuff!1: (GenericBase) -> (T, U) -> () : _T027vtable_thunks_reabstraction15MoreGenericSub1C7doStuffyx1t_qd__1utlF // MoreGenericSub1.doStuff (t : A, u : A1) -> () -// CHECK-NEXT: #GenericBase.init!initializer.1: (GenericBase.Type) -> (T, U) -> GenericBase : _T027vtable_thunks_reabstraction11GenericBaseCACyxGx1t_qd__1utclufc // GenericBase.init (t : A, u : A1) -> GenericBase +// CHECK-NEXT: #GenericBase.doStuff!1: (GenericBase) -> (T, U) -> () : _T027vtable_thunks_reabstraction15MoreGenericSub1C7doStuffyx1t_qd__1utlF // MoreGenericSub1.doStuff(t:u:) +// CHECK-NEXT: #GenericBase.init!initializer.1: (GenericBase.Type) -> (T, U) -> GenericBase : _T027vtable_thunks_reabstraction11GenericBaseCACyxGx1t_qd__1utclufc // GenericBase.init(t:u:) // CHECK-NEXT: #MoreGenericSub1.deinit!deallocator: _T027vtable_thunks_reabstraction15MoreGenericSub1CfD // MoreGenericSub1.__deallocating_deinit // CHECK-NEXT: } @@ -552,7 +552,7 @@ class MoreGenericSub2 : GenericBase { } // CHECK-LABEL: sil_vtable MoreGenericSub2 { -// CHECK-NEXT: #GenericBase.doStuff!1: (GenericBase) -> (T, U) -> () : _T027vtable_thunks_reabstraction15MoreGenericSub2C7doStuffyq_1t_qd__1utlF // MoreGenericSub2.doStuff (t : B, u : A1) -> () -// CHECK-NEXT: #GenericBase.init!initializer.1: (GenericBase.Type) -> (T, U) -> GenericBase : _T027vtable_thunks_reabstraction11GenericBaseCACyxGx1t_qd__1utclufc // GenericBase.init (t : A, u : A1) -> GenericBase +// CHECK-NEXT: #GenericBase.doStuff!1: (GenericBase) -> (T, U) -> () : _T027vtable_thunks_reabstraction15MoreGenericSub2C7doStuffyq_1t_qd__1utlF // MoreGenericSub2.doStuff(t:u:) +// CHECK-NEXT: #GenericBase.init!initializer.1: (GenericBase.Type) -> (T, U) -> GenericBase : _T027vtable_thunks_reabstraction11GenericBaseCACyxGx1t_qd__1utclufc // GenericBase.init(t:u:) // CHECK-NEXT: #MoreGenericSub2.deinit!deallocator: _T027vtable_thunks_reabstraction15MoreGenericSub2CfD // MoreGenericSub2.__deallocating_deinit // CHECK-NEXT: } diff --git a/test/SILGen/weak.swift b/test/SILGen/weak.swift index 8bb51e20070db..dae9018048be6 100644 --- a/test/SILGen/weak.swift +++ b/test/SILGen/weak.swift @@ -45,7 +45,7 @@ func test0(c c: C) { } // silgen crashes on weak capture -// CHECK: weak.(testClosureOverWeak () -> ()).(closure #1) +// CHECK: closure #1 () -> Swift.Int in weak.testClosureOverWeak() -> () // CHECK-LABEL: sil private @_T04weak19testClosureOverWeakyyFSiycfU_ : $@convention(thin) (@owned { var @sil_weak Optional }) -> Int { // CHECK: bb0(%0 : ${ var @sil_weak Optional }): // CHECK-NEXT: %1 = project_box %0 diff --git a/test/SILOptimizer/alive_method_with_thunk.swift b/test/SILOptimizer/alive_method_with_thunk.swift index df4cbd9306357..a032287e49ee6 100644 --- a/test/SILOptimizer/alive_method_with_thunk.swift +++ b/test/SILOptimizer/alive_method_with_thunk.swift @@ -15,10 +15,10 @@ public class DerivedClass: BaseClass { } // CHECK: sil_vtable BaseClass { -// CHECK: #BaseClass.doSomething!1: (BaseClass) -> (T) -> Int : _T023alive_method_with_thunk9BaseClassC11doSomethingSixF // BaseClass.doSomething(A) -> Int +// CHECK: #BaseClass.doSomething!1: (BaseClass) -> (T) -> Int : _T023alive_method_with_thunk9BaseClassC11doSomethingSixF // BaseClass.doSomething(_:) // CHECK: } // CHECK: sil_vtable DerivedClass { -// CHECK: #BaseClass.doSomething!1: (BaseClass) -> (T) -> Int : public _T023alive_method_with_thunk12DerivedClassC11doSomethingSiSdFAA04BaseF0CADSixFTV // vtable thunk for BaseClass.doSomething(A) -> Int dispatching to DerivedClass.doSomething(Double) -> Int +// CHECK: #BaseClass.doSomething!1: (BaseClass) -> (T) -> Int : public _T023alive_method_with_thunk12DerivedClassC11doSomethingSiSdFAA04BaseF0CADSixFTV // vtable thunk for BaseClass.doSomething(_:) dispatching to DerivedClass.doSomething(_:) // CHECK: } diff --git a/test/SILOptimizer/eager_specialize.sil b/test/SILOptimizer/eager_specialize.sil index 9b41959c18751..430d175ae1e86 100644 --- a/test/SILOptimizer/eager_specialize.sil +++ b/test/SILOptimizer/eager_specialize.sil @@ -198,7 +198,7 @@ bb2: // CHECK: cond_br %7, bb6, bb1 // CHECK: bb1: -// CHECK: // function_ref static != infix (A, A) -> Bool +// CHECK: // function_ref static != infix(_:_:) // CHECK: cond_br %{{.*}}, bb4, bb2 // CHECK: bb2: @@ -222,7 +222,7 @@ bb2: // CHECK: %{{.*}} = load %{{.*}} : $*Int // CHECK: %{{.*}} = unchecked_addr_cast %2 : $*T to $*Int // CHECK: %{{.*}} = load %{{.*}} : $*Int -// CHECK: // function_ref specialized divideNum (A, den : A) throws -> A +// CHECK: // function_ref specialized divideNum(_:den:) // CHECK: %{{.*}} = function_ref @_T016eager_specialize9divideNumxx_x3dentKs13SignedIntegerRzlFSi_Tg5 : $@convention(thin) (Int, Int) -> (Int, @error Error) // CHECK: try_apply %{{.*}}(%{{.*}}, %{{.*}}) : $@convention(thin) (Int, Int) -> (Int, @error Error), normal bb8, error bb7 @@ -258,20 +258,20 @@ bb0(%0 : $*T): return %4 : $() } -// CHECK-LABEL: // specialized voidReturn (A) -> () +// CHECK-LABEL: // specialized voidReturn(_:) // CHECK: sil shared @_T016eager_specialize10voidReturnyxlFSf_Tg5 : $@convention(thin) (Float) -> () { // %0 // user: %2 // CHECK: bb0(%0 : $Float): // CHECK: return %5 : $() -// CHECK-LABEL: // specialized voidReturn (A) -> () +// CHECK-LABEL: // specialized voidReturn(_:) // CHECK: sil shared @_T016eager_specialize10voidReturnyxlFs5Int64V_Tg5 : $@convention(thin) (Int64) -> () { // CHECK: bb0(%0 : $Int64): // CHECK: return %5 : $() // Generic with specialized dispatch. No more [specialize] attribute. // -// CHECK-LABEL: // voidReturn (A) -> () +// CHECK-LABEL: // voidReturn(_:) // CHECK: sil @_T016eager_specialize10voidReturnyxlF : $@convention(thin) (@in T) -> () { // CHECK: bb0(%0 : $*T): // CHECK: builtin "cmp_eq_Word" @@ -297,27 +297,27 @@ bb0(%0 : $*T): // CHECK: bb5: // CHECK: br bb3 -// nonvoidReturn (A) -> Int64 +// nonvoidReturn(A) -> Int64 sil [_specialize where T == Float] [_specialize where T == Int64] @_T016eager_specialize13nonvoidReturns5Int64VxlF : $@convention(thin) (@in T) -> Int64 { // %0 // users: %1, %3 bb0(%0 : $*T): - // function_ref foo (A) -> Int64 + // function_ref foo(A) -> Int64 %2 = function_ref @_T016eager_specialize3foos5Int64VxlF : $@convention(thin) <τ_0_0> (@in τ_0_0) -> Int64 %3 = apply %2(%0) : $@convention(thin) <τ_0_0> (@in τ_0_0) -> Int64 return %3 : $Int64 } -// CHECK-LABEL: // specialized nonvoidReturn (A) -> Int64 +// CHECK-LABEL: // specialized nonvoidReturn(_:) // CHECK: sil shared @_T016eager_specialize13nonvoidReturns5Int64VxlFSf_Tg5 : $@convention(thin) (Float) -> Int64 { // CHECK: bb0(%0 : $Float): // CHECK: return %4 : $Int64 -// CHECK-LABEL: // specialized nonvoidReturn (A) -> Int64 +// CHECK-LABEL: // specialized nonvoidReturn(_:) // CHECK: sil shared @_T016eager_specialize13nonvoidReturns5Int64VxlFAD_Tg5 : $@convention(thin) (Int64) -> Int64 { // CHECK: bb0(%0 : $Int64): // CHECK: return %4 : $Int64 -// CHECK-LABEL: // nonvoidReturn (A) -> Int64 +// CHECK-LABEL: // nonvoidReturn(_:) // CHECK: sil @_T016eager_specialize13nonvoidReturns5Int64VxlF : $@convention(thin) (@in T) -> Int64 { // CHECK: bb0(%0 : $*T): // CHECK: builtin "cmp_eq_Word" @@ -328,7 +328,7 @@ bb0(%0 : $*T): // CHECK: cond_br %{{.*}}, bb4, bb2 // CHECK: bb2: -// CHECK: // function_ref foo (A) -> Int64 +// CHECK: // function_ref foo(_:) // CHECK: function_ref @_T016eager_specialize3foos5Int64VxlF : $@convention(thin) <τ_0_0> (@in τ_0_0) -> Int64 // CHECK: apply %13 // CHECK: br bb3(%{{.*}} : $Int64) @@ -357,7 +357,7 @@ bb0(%0 : $*S, %1 : $*S, %2 : $*S): // Check specialized for 32 bits -// specialized copyValueAndReturn (A, s : inout A) -> A +// specialized copyValueAndReturn(A, s : inout A) -> A // CHECK-LABEL: sil shared [noinline] @_T016eager_specialize18copyValueAndReturnxx_xz1stlFxxxRlze31_lItilr_Tp5 : $@convention(thin) <τ_0_0 where τ_0_0 : _Trivial(32)> (@in τ_0_0, @inout τ_0_0) -> @out τ_0_0 // CHECK: bb0(%0 : $*τ_0_0, %1 : $*τ_0_0, %2 : $*τ_0_0): // CHECK: copy_addr %2 to [initialization] %0 : $*τ_0_0 @@ -367,7 +367,7 @@ bb0(%0 : $*S, %1 : $*S, %2 : $*S): // CHECK: } // end sil function '_T016eager_specialize18copyValueAndReturnxx_xz1stlFxxxRlze31_lItilr_Tp5' // Check specialized for 64 bits -// specialized copyValueAndReturn (A, s : inout A) -> A +// specialized copyValueAndReturn(A, s : inout A) -> A // CHECK-LABEL: sil shared [noinline] @_T016eager_specialize18copyValueAndReturnxx_xz1stlFxxxRlze63_lItilr_Tp5 : $@convention(thin) <τ_0_0 where τ_0_0 : _Trivial(64)> (@in τ_0_0, @inout τ_0_0) -> @out τ_0_0 // CHECK: bb0(%0 : $*τ_0_0, %1 : $*τ_0_0, %2 : $*τ_0_0): // CHECK: copy_addr %2 to [initialization] %0 : $*τ_0_0 diff --git a/test/SILOptimizer/functionsigopts_self.swift b/test/SILOptimizer/functionsigopts_self.swift index 34af0fa6b8ed6..f6e8429e4aa76 100644 --- a/test/SILOptimizer/functionsigopts_self.swift +++ b/test/SILOptimizer/functionsigopts_self.swift @@ -23,7 +23,7 @@ extension C { // function signature specialization of static functionsigopts_self.C.factory (functionsigopts_self.C.Type)(Swift.Int) -> Self // CHECK-LABEL: sil hidden @_T020functionsigopts_self1CC7factory{{[_0-9a-zA-Z]*}}FZTf4dn_n : $@convention(method) (@thick C.Type) -> @owned C // CHECK: bb0(%0 : $@thick C.Type): -// CHECK: function_ref functionsigopts_self.gen () -> A +// CHECK: function_ref functionsigopts_self.gen() -> A // CHECK: apply %{{[0-9]+}}<@dynamic_self C> // Call the function so the specialization is not dead. diff --git a/test/SILOptimizer/inline_self.swift b/test/SILOptimizer/inline_self.swift index 761d54cb40ab2..31a1e823ea159 100644 --- a/test/SILOptimizer/inline_self.swift +++ b/test/SILOptimizer/inline_self.swift @@ -63,11 +63,11 @@ class Z : BaseZ { _ = Z().capturesSelf() // CHECK-LABEL: sil @main : $@convention(c) -// CHECK: function_ref static inline_self.C.factory (Swift.Int) -> Self +// CHECK: function_ref static inline_self.C.factory(Swift.Int) -> Self // CHECK: [[F:%[0-9]+]] = function_ref @_T011inline_self1CC7factory{{[_0-9a-zA-Z]*}}FZ : $@convention(method) (Int, @thick C.Type) -> @owned C // CHECK: apply [[F]](%{{.+}}, %{{.+}}) : $@convention(method) (Int, @thick C.Type) -> @owned C -// CHECK: function_ref inline_self.Z.capturesSelf () -> Self +// CHECK: function_ref inline_self.Z.capturesSelf() -> Self // CHECK: [[F:%[0-9]+]] = function_ref @_T011inline_self1ZC12capturesSelfACXDyF : $@convention(method) (@guaranteed Z) -> @owned Z // CHECK: [[Z:%.*]] = alloc_ref $Z // CHECK: apply [[F]]([[Z]]) : $@convention(method) (@guaranteed Z) -> @owned diff --git a/test/SILOptimizer/specialize_self.swift b/test/SILOptimizer/specialize_self.swift index b9130025b4525..9599896997f9b 100644 --- a/test/SILOptimizer/specialize_self.swift +++ b/test/SILOptimizer/specialize_self.swift @@ -2,13 +2,13 @@ // CHECK-NOT: generic specialization of specialize_self.cast (A) -> Swift.Optional -// CHECK-LABEL: specialize_self.cast (A) -> Swift.Optional +// CHECK-LABEL: specialize_self.cast(A) -> Swift.Optional // CHECK-NEXT: sil hidden @_T015specialize_self4cast{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@in T) -> @out Optional func cast(_ x: T) -> R? { return x as? R } -// CHECK-LABEL: static specialize_self.Base.returnIfSelf (Swift.AnyObject) -> Swift.Optional +// CHECK-LABEL: static specialize_self.Base.returnIfSelf(Swift.AnyObject) -> Swift.Optional // CHECK-NEXT: sil hidden @_T015specialize_self4BaseC12returnIfSelf{{[_0-9a-zA-Z]*}}FZ : $@convention(method) (@owned AnyObject, @thick Base.Type) -> @owned Optional // CHECK: [[CAST:%[0-9]+]] = function_ref @_T015specialize_self4cast{{[_0-9a-zA-Z]*}}F // CHECK: apply [[CAST]] diff --git a/test/TBD/Inputs/class.log b/test/TBD/Inputs/class.log index 0924f663ec913..bbcd334929782 100644 --- a/test/TBD/Inputs/class.log +++ b/test/TBD/Inputs/class.log @@ -1,21 +1,21 @@ -:0: error: symbol '_T04test10PublicInitCACSi7public__tcfCWo' (witness table offset for test.PublicInit.__allocating_init (public_ : Swift.Int) -> test.PublicInit) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test10PublicInitCACSi7public__tcfc' (test.PublicInit.init (public_ : Swift.Int) -> test.PublicInit) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test10PublicInitCACSi9internal__tcfc' (test.PublicInit.init (internal_ : Swift.Int) -> test.PublicInit) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test10PublicInitCACycfCWo' (witness table offset for test.PublicInit.__allocating_init () -> test.PublicInit) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test10PublicInitCACycfc' (test.PublicInit.init () -> test.PublicInit) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test10PublicInitCACSi7public__tcfCWo' (witness table offset for test.PublicInit.__allocating_init(public_: Swift.Int) -> test.PublicInit) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test10PublicInitCACSi7public__tcfc' (test.PublicInit.init(public_: Swift.Int) -> test.PublicInit) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test10PublicInitCACSi9internal__tcfc' (test.PublicInit.init(internal_: Swift.Int) -> test.PublicInit) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test10PublicInitCACycfCWo' (witness table offset for test.PublicInit.__allocating_init() -> test.PublicInit) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test10PublicInitCACycfc' (test.PublicInit.init() -> test.PublicInit) is in generated IR file, but not in TBD file :0: error: symbol '_T04test10PublicInitCMm' (metaclass for test.PublicInit) is in generated IR file, but not in TBD file :0: error: symbol '_T04test10PublicInitCfd' (test.PublicInit.deinit) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test13PublicMethodsC12publicMethodyyFWo' (witness table offset for test.PublicMethods.publicMethod () -> ()) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test13PublicMethodsC13privateMethod33_C78BF7A60640620A6DFBB107F4401C5CLLyyF' (test.PublicMethods.(privateMethod in _C78BF7A60640620A6DFBB107F4401C5C) () -> ()) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test13PublicMethodsC14internalMethodyyF' (test.PublicMethods.internalMethod () -> ()) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test13PublicMethodsCACycfCWo' (witness table offset for test.PublicMethods.__allocating_init () -> test.PublicMethods) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test13PublicMethodsCACycfc' (test.PublicMethods.init () -> test.PublicMethods) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test13PublicMethodsC12publicMethodyyFWo' (witness table offset for test.PublicMethods.publicMethod() -> ()) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test13PublicMethodsC13privateMethod33_C78BF7A60640620A6DFBB107F4401C5CLLyyF' (test.PublicMethods.(privateMethod in _C78BF7A60640620A6DFBB107F4401C5C)() -> ()) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test13PublicMethodsC14internalMethodyyF' (test.PublicMethods.internalMethod() -> ()) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test13PublicMethodsCACycfCWo' (witness table offset for test.PublicMethods.__allocating_init() -> test.PublicMethods) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test13PublicMethodsCACycfc' (test.PublicMethods.init() -> test.PublicMethods) is in generated IR file, but not in TBD file :0: error: symbol '_T04test13PublicMethodsCMm' (metaclass for test.PublicMethods) is in generated IR file, but not in TBD file :0: error: symbol '_T04test13PublicMethodsCfd' (test.PublicMethods.deinit) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test13PublicNothingCACycfc' (test.PublicNothing.init () -> test.PublicNothing) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test13PublicNothingCACycfc' (test.PublicNothing.init() -> test.PublicNothing) is in generated IR file, but not in TBD file :0: error: symbol '_T04test13PublicNothingCMm' (metaclass for test.PublicNothing) is in generated IR file, but not in TBD file :0: error: symbol '_T04test13PublicNothingCfd' (test.PublicNothing.deinit) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test13PublicStaticsCACycfc' (test.PublicStatics.init () -> test.PublicStatics) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test13PublicStaticsCACycfc' (test.PublicStatics.init() -> test.PublicStatics) is in generated IR file, but not in TBD file :0: error: symbol '_T04test13PublicStaticsCMm' (metaclass for test.PublicStatics) is in generated IR file, but not in TBD file :0: error: symbol '_T04test13PublicStaticsCfd' (test.PublicStatics.deinit) is in generated IR file, but not in TBD file :0: error: symbol '_T04test16PublicPropertiesC10privateVar33_C78BF7A60640620A6DFBB107F4401C5CLLSifg' (test.PublicProperties.(privateVar in _C78BF7A60640620A6DFBB107F4401C5C).getter : Swift.Int) is in generated IR file, but not in TBD file @@ -37,13 +37,13 @@ :0: error: symbol '_T04test16PublicPropertiesC17internalVarGetSetSifm' (test.PublicProperties.internalVarGetSet.materializeForSet : Swift.Int) is in generated IR file, but not in TBD file :0: error: symbol '_T04test16PublicPropertiesC17internalVarGetSetSifs' (test.PublicProperties.internalVarGetSet.setter : Swift.Int) is in generated IR file, but not in TBD file :0: error: symbol '_T04test16PublicPropertiesC9publicLetSivWvd' (direct field offset for test.PublicProperties.publicLet : Swift.Int) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test16PublicPropertiesC9publicLetSivfi' (test.PublicProperties.(publicLet : Swift.Int).(variable initialization expression)) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test16PublicPropertiesC9publicLetSivfi' (variable initialization expression of test.PublicProperties.publicLet : Swift.Int) is in generated IR file, but not in TBD file :0: error: symbol '_T04test16PublicPropertiesC9publicVarSifgWo' (witness table offset for test.PublicProperties.publicVar.getter : Swift.Int) is in generated IR file, but not in TBD file :0: error: symbol '_T04test16PublicPropertiesC9publicVarSifmWo' (witness table offset for test.PublicProperties.publicVar.materializeForSet : Swift.Int) is in generated IR file, but not in TBD file :0: error: symbol '_T04test16PublicPropertiesC9publicVarSifsWo' (witness table offset for test.PublicProperties.publicVar.setter : Swift.Int) is in generated IR file, but not in TBD file :0: error: symbol '_T04test16PublicPropertiesC9publicVarSivWvd' (direct field offset for test.PublicProperties.publicVar : Swift.Int) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test16PublicPropertiesC9publicVarSivfi' (test.PublicProperties.(publicVar : Swift.Int).(variable initialization expression)) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test16PublicPropertiesCACycfc' (test.PublicProperties.init () -> test.PublicProperties) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test16PublicPropertiesC9publicVarSivfi' (variable initialization expression of test.PublicProperties.publicVar : Swift.Int) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test16PublicPropertiesCACycfc' (test.PublicProperties.init() -> test.PublicProperties) is in generated IR file, but not in TBD file :0: error: symbol '_T04test16PublicPropertiesCMm' (metaclass for test.PublicProperties) is in generated IR file, but not in TBD file :0: error: symbol '_T04test16PublicPropertiesCfd' (test.PublicProperties.deinit) is in generated IR file, but not in TBD file :0: error: symbol '_T04test13PublicStaticsC15publicVarGetSetSifmZ' (static test.PublicStatics.publicVarGetSet.materializeForSet : Swift.Int) is in TBD file, but not in generated IR diff --git a/test/TBD/Inputs/protocol.log b/test/TBD/Inputs/protocol.log index b91173ffc6876..c7014988da275 100644 --- a/test/TBD/Inputs/protocol.log +++ b/test/TBD/Inputs/protocol.log @@ -1,9 +1,9 @@ -:0: error: symbol '_T04test013PublicPrivateB6StructV13privateVarGetSivfi' (test.PublicPrivatePublicStruct.(privateVarGet : Swift.Int).(variable initialization expression)) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test013PublicPrivateB6StructV16privateVarGetSetSivfi' (test.PublicPrivatePublicStruct.(privateVarGetSet : Swift.Int).(variable initialization expression)) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test014PublicInternalB6StructV14internalVarGetSivfi' (test.PublicInternalPublicStruct.(internalVarGet : Swift.Int).(variable initialization expression)) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test014PublicInternalB6StructV17internalVarGetSetSivfi' (test.PublicInternalPublicStruct.(internalVarGetSet : Swift.Int).(variable initialization expression)) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test06PublicbB6StructV12publicVarGetSivfi' (test.PublicPublicPublicStruct.(publicVarGet : Swift.Int).(variable initialization expression)) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test06PublicbB6StructV15publicVarGetSetSivfi' (test.PublicPublicPublicStruct.(publicVarGetSet : Swift.Int).(variable initialization expression)) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test013PublicPrivateB6StructV13privateVarGetSivfi' (variable initialization expression of test.PublicPrivatePublicStruct.privateVarGet : Swift.Int) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test013PublicPrivateB6StructV16privateVarGetSetSivfi' (variable initialization expression of test.PublicPrivatePublicStruct.privateVarGetSet : Swift.Int) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test014PublicInternalB6StructV14internalVarGetSivfi' (variable initialization expression of test.PublicInternalPublicStruct.internalVarGet : Swift.Int) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test014PublicInternalB6StructV17internalVarGetSetSivfi' (variable initialization expression of test.PublicInternalPublicStruct.internalVarGetSet : Swift.Int) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test06PublicbB6StructV12publicVarGetSivfi' (variable initialization expression of test.PublicPublicPublicStruct.publicVarGet : Swift.Int) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test06PublicbB6StructV15publicVarGetSetSivfi' (variable initialization expression of test.PublicPublicPublicStruct.publicVarGetSet : Swift.Int) is in generated IR file, but not in TBD file :0: error: symbol '_T04test013PublicPrivateB6StructV13privateVarGetSifg' (test.PublicPrivatePublicStruct.privateVarGet.getter : Swift.Int) is in TBD file, but not in generated IR :0: error: symbol '_T04test013PublicPrivateB6StructV16privateVarGetSetSifg' (test.PublicPrivatePublicStruct.privateVarGetSet.getter : Swift.Int) is in TBD file, but not in generated IR :0: error: symbol '_T04test013PublicPrivateB6StructV16privateVarGetSetSifm' (test.PublicPrivatePublicStruct.privateVarGetSet.materializeForSet : Swift.Int) is in TBD file, but not in generated IR diff --git a/test/TBD/Inputs/struct.log b/test/TBD/Inputs/struct.log index 5122b90e88955..d82c8427f3af3 100644 --- a/test/TBD/Inputs/struct.log +++ b/test/TBD/Inputs/struct.log @@ -1,5 +1,5 @@ -:0: error: symbol '_T04test16PublicPropertiesV9publicLetSivfi' (test.PublicProperties.(publicLet : Swift.Int).(variable initialization expression)) is in generated IR file, but not in TBD file -:0: error: symbol '_T04test16PublicPropertiesV9publicVarSivfi' (test.PublicProperties.(publicVar : Swift.Int).(variable initialization expression)) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test16PublicPropertiesV9publicLetSivfi' (variable initialization expression of test.PublicProperties.publicLet : Swift.Int) is in generated IR file, but not in TBD file +:0: error: symbol '_T04test16PublicPropertiesV9publicVarSivfi' (variable initialization expression of test.PublicProperties.publicVar : Swift.Int) is in generated IR file, but not in TBD file :0: error: symbol '_T04test13PublicStaticsV15publicVarGetSetSifmZ' (static test.PublicStatics.publicVarGetSet.materializeForSet : Swift.Int) is in TBD file, but not in generated IR :0: error: symbol '_T04test13PublicStaticsV9publicLetSifgZ' (static test.PublicStatics.publicLet.getter : Swift.Int) is in TBD file, but not in generated IR :0: error: symbol '_T04test13PublicStaticsV9publicVarSifgZ' (static test.PublicStatics.publicVar.getter : Swift.Int) is in TBD file, but not in generated IR diff --git a/test/stdlib/Mirror.swift b/test/stdlib/Mirror.swift index 32864dca4b80d..c9f5e47e045e6 100644 --- a/test/stdlib/Mirror.swift +++ b/test/stdlib/Mirror.swift @@ -728,7 +728,7 @@ mirrors.test("PlaygroundQuickLook") { case .text(let text): #if _runtime(_ObjC) // FIXME: Enable if non-objc hasSuffix is implemented. - expectTrue(text.hasSuffix(".(X #1)()"), text) + expectTrue(text.contains("X #1 in"), text) #endif default: expectTrue(false) diff --git a/tools/sil-func-extractor/SILFunctionExtractor.cpp b/tools/sil-func-extractor/SILFunctionExtractor.cpp index a5af6bf9b2502..701113acbd8aa 100644 --- a/tools/sil-func-extractor/SILFunctionExtractor.cpp +++ b/tools/sil-func-extractor/SILFunctionExtractor.cpp @@ -177,7 +177,7 @@ void removeUnwantedFunctions(SILModule *M, ArrayRef MangledNames, StringRef MangledName = F.getName(); std::string DemangledName = swift::Demangle::demangleSymbolAsString(MangledName); - DemangledName = DemangledName.substr(0, DemangledName.find(' ')); + DemangledName = DemangledName.substr(0, DemangledName.find_first_of(" <(")); DEBUG(llvm::dbgs() << "Visiting New Func:\n" << " Mangled: " << MangledName << "\n Demangled: " << DemangledName << "\n"); diff --git a/unittests/SwiftDemangle/DemangleTest.cpp b/unittests/SwiftDemangle/DemangleTest.cpp index f89b39e580285..dd31c7b99d6bc 100644 --- a/unittests/SwiftDemangle/DemangleTest.cpp +++ b/unittests/SwiftDemangle/DemangleTest.cpp @@ -19,7 +19,7 @@ TEST(FunctionNameDemangleTests, CorrectlyDemangles) { char OutputBuffer[128]; const char *FunctionName = "_TFC3foo3bar3basfT3zimCS_3zim_T_"; - const char *DemangledName = "foo.bar.bas (zim : foo.zim) -> ()"; + const char *DemangledName = "foo.bar.bas(zim: foo.zim) -> ()"; size_t Result = swift_demangle_getDemangledName(FunctionName, OutputBuffer, sizeof(OutputBuffer)); @@ -29,7 +29,7 @@ TEST(FunctionNameDemangleTests, CorrectlyDemangles) { // Make sure the SynthesizeSugarOnTypes option is functioning. const char *FunctionNameWithSugar = "_TF4main3fooFT3argGSqGSaSi___T_"; - const char *DemangledNameWithSugar = "main.foo (arg : [Swift.Int]?) -> ()"; + const char *DemangledNameWithSugar = "main.foo(arg: [Swift.Int]?) -> ()"; Result = swift_demangle_getDemangledName(FunctionNameWithSugar, OutputBuffer, sizeof(OutputBuffer)); @@ -40,7 +40,7 @@ TEST(FunctionNameDemangleTests, CorrectlyDemangles) { TEST(FunctionNameDemangledTests, WorksWithNULLBuffer) { const char *FunctionName = "_TFC3foo3bar3basfT3zimCS_3zim_T_"; - const char *DemangledName = "foo.bar.bas (zim : foo.zim) -> ()"; + const char *DemangledName = "foo.bar.bas(zim: foo.zim) -> ()"; // When given a null buffer, swift_demangle_getDemangledName should still be // able to return the size of the demangled string.