Mangling: consider bound generic types for substitutions

This shrinks the name length if the same bound generic type is used multiple times, like: func foo(_ x: [Int], _ y: [Int])
This commit is contained in:
Erik Eckstein
2017-03-01 16:52:39 -08:00
parent dfcad1a2ca
commit fcd79c044d
34 changed files with 139 additions and 116 deletions

View File

@@ -33,7 +33,7 @@ public func mangle(s: [UnicodeScalar]) -> [UnicodeScalar] {
// which shares the storage with the expression in the switch statement. Make
// sure we only emit live range extensions for the storage once per basic block.
// CHECK: define {{.*}}@_T011patternvars6mangleSayAA13UnicodeScalarVGSayADG1s_tFAdDcfU_
// CHECK: define {{.*}}@_T011patternvars6mangleSayAA13UnicodeScalarVGAE1s_tFAdDcfU_
// CHECK: call void asm sideeffect "", "r"
// CHECK-NOT: call void asm sideeffect "", "r"
// CHECK: br {{.*}}label