mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
And include some supplementary mangling changes: - Give the first generic param (depth=0, index=0) a single character mangling. Even after removing the self type from method declaration types, 'Self' still shows up very frequently in protocol requirement signatures. - Fix the mangling of generic parameter counts to elide the count when there's only one parameter at the starting depth of the mangling. Together these carve another 154KB out of a debug standard library. There's some awkwardness in demangled strings that I'll clean up in subsequent commits; since decl types now only mangle the number of generic params at their own depth, it's context-dependent what depths those represent, which we get wrong now. Currying markers are also wrong, but since free function currying is going away, we can mangle the partial application thunks in different ways. Swift SVN r32896
29 lines
502 B
Swift
29 lines
502 B
Swift
// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o - | FileCheck %s
|
|
|
|
class ClassA
|
|
{
|
|
var x : Int64
|
|
var y : Float
|
|
|
|
init (_ input : Int64)
|
|
{
|
|
x = input
|
|
y = Float(input) + 0.5
|
|
}
|
|
}
|
|
|
|
class ClassB : ClassA
|
|
{
|
|
override init (_ input : Int64)
|
|
{
|
|
// CHECK: @_TFC{{.*}}6ClassBcfVs5Int64S0_
|
|
// CHECK: alloca {{.*}}ClassB*
|
|
// CHECK: alloca i64
|
|
// CHECK-NOT: alloca
|
|
// CHECK: ret {{.*}}ClassB
|
|
super.init (input)
|
|
}
|
|
}
|
|
|
|
let b = ClassB(1);
|