Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgallagher committed Feb 5, 2025
1 parent 195d7a2 commit 9d47033
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions CwlDemangle/CwlDemangle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3936,18 +3936,17 @@ fileprivate struct SymbolPrinter {
case .identifier:
target.write(name.text ?? "")
case .index: target.write("\(name.index ?? 0)")
case .noEscapeFunctionType: printFunctionType(name)
case .escapingAutoClosureType:
target.write("@autoclosure ")
printFunctionType(name)
case .autoClosureType:
target.write("@autoclosure ")
printFunctionType(name)
case .thinFunctionType:
target.write("@convention(thin) ")
printFunctionType(name)

case .cFunctionPointer: fallthrough
case .objCBlock: fallthrough
case .noEscapeFunctionType: fallthrough
case .escapingAutoClosureType: fallthrough
case .autoClosureType: fallthrough
case .thinFunctionType: fallthrough
case .functionType: fallthrough
case .uncurriedFunctionType: printFunctionType(name)
case .escapingObjCBlock: fallthrough
case .uncurriedFunctionType:
printFunctionType(name)
case .argumentTuple:
printFunctionParameters(labelList: nil, parameterType: name, showTypes: options.contains(.showFunctionArgumentTypes))
case .tuple: printChildren(name, prefix: "(", suffix: ")", separator: ", ")
Expand Down Expand Up @@ -4133,12 +4132,6 @@ fileprivate struct SymbolPrinter {
case .boundGenericOtherNominalType: fallthrough
case .boundGenericTypeAlias: printBoundGeneric(name)
case .dynamicSelf: target.write("Self")
case .cFunctionPointer:
target.write("@convention(c) ")
printFunctionType(name)
case .objCBlock:
target.write("@convention(block) ")
printFunctionType(name)
case .silBoxType:
target.write("@box ")
printFirstChild(name)
Expand Down Expand Up @@ -4569,8 +4562,6 @@ fileprivate struct SymbolPrinter {
case .uniqueExtendedExistentialTypeShapeSymbolicReference:
target.write("non-unique existential shape symbolic reference 0x")
target.writeHex(name.index ?? 0)
case .escapingObjCBlock:
printFunctionType(name)
}

return nil
Expand Down Expand Up @@ -4859,6 +4850,7 @@ fileprivate struct SymbolPrinter {
_ = printName(firstChild)
target.write("\"")
}
target.write(") ")
}

mutating func printFunctionType(labelList: SwiftSymbol? = nil, _ name: SwiftSymbol) {
Expand Down

0 comments on commit 9d47033

Please sign in to comment.