Files
swift-mirror/test/DebugInfo/iuo_arg.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

35 lines
1.1 KiB
Swift

// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s
class CGImageRef {}
class UIImage {
init() {}
var CGImage : CGImageRef? {
get { return self.CGImage }
}
}
class NSDictionary {}
class CIFilter {
init (name: String) {}
}
class MyClass {
// CHECK: define hidden %C7iuo_arg7UIImage* @_TFC7iuo_arg7MyClass11filterImagefTGSQCS_7UIImage_Sb_S1_
func filterImage(image: UIImage!, _ doSomething:Bool) -> UIImage
{
// Test that image is in an alloca, but not an indirect location.
// CHECK: store {{(i32|i64)}} %0, {{(i32|i64)}}* %[[ALLOCA:.*]], align
// CHECK: call void @llvm.dbg.declare(metadata {{(i32|i64)}}* %[[ALLOCA]], metadata ![[IMAGE:.*]], metadata !{{[0-9]+}})
// CHECK: ![[IMAGE]] = !DILocalVariable(name: "image", arg: 1
// CHECK-NOT: flags:
// CHECK-SAME: line: [[@LINE-7]]
// CHECK-NOT: flags:
// CHECK-SAME: ){{$}}
let filter = CIFilter(name: "CIGaussianBlur")
return image
}
}
let a = MyClass()
let img = a.filterImage(UIImage(), true)