mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ASTDemangler: Add support for lowered function types
This commit is contained in:
27
test/TypeDecoder/lowered_function_types.swift
Normal file
27
test/TypeDecoder/lowered_function_types.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
|
||||
// RUN: %target-build-swift -emit-executable %s -g -o %t/lowered_function_types -emit-module
|
||||
// RUN: sed -ne '/\/\/ *DEMANGLE: /s/\/\/ *DEMANGLE: *//p' < %s > %t/input
|
||||
// RUN: %lldb-moduleimport-test %t/lowered_function_types -type-from-mangled=%t/input | %FileCheck %s
|
||||
|
||||
func blackHole(_: Any...) {}
|
||||
|
||||
class Class {}
|
||||
|
||||
do {
|
||||
let fn: (Int, Class, __owned Class, Any, inout Int) -> (Int, Class, Any) = {
|
||||
_, _, _, _, _ in fatalError()
|
||||
}
|
||||
blackHole(fn)
|
||||
}
|
||||
|
||||
do {
|
||||
let fn: () throws -> () = {}
|
||||
blackHole(fn)
|
||||
}
|
||||
|
||||
// DEMANGLE: $sSi22lowered_function_types5ClassCACypS2iACypIegygxnldor_D
|
||||
// DEMANGLE: $ss5Error_pIegzo_D
|
||||
|
||||
// CHECK: @callee_guaranteed (Int, @guaranteed Class, @owned Class, @in_guaranteed Any, @inout Int) -> (Int, @owned Class, @out Any)
|
||||
// CHECK: @callee_guaranteed () -> @error Error
|
||||
Reference in New Issue
Block a user