Files
swift-mirror/test/IRGen/objc_local.swift
Joe Groff 2368ce774b Remove self types from mangling by default.
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
2015-10-26 22:05:20 +00:00

18 lines
415 B
Swift

// RUN: rm -rf %t && mkdir %t
// RUN: %build-irgen-test-overlays
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | FileCheck %s
// REQUIRES: objc_interop
import Foundation
func foo() -> Int64 {
// CHECK-LABEL: define internal i64 @_TToFCF10objc_local3fooFT_Vs5Int64L_3Bar10returnFivefT_S0_
class Bar: NSObject {
@objc func returnFive() -> Int64 { return 6 }
}
return 0
}