Files
swift-mirror/test/DebugInfo/iuo_arg.swift
Duncan Exon Smith c6d42db070 Adapt to MD* => DI* renaming of debug info types
Applied the upgrade script from r236120 (LLVM) and r236121 (CFE).  This is the
final step of rdar://problem/20434113.



Swift SVN r27925
2015-04-29 21:40:21 +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_arg7MyClass11filterImagefS0_FTGSQCS_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:.*]],
// CHECK: call void @llvm.dbg.declare(metadata {{(i32|i64)}}* %[[ALLOCA]], metadata ![[IMAGE:.*]], metadata !{{[0-9]+}})
// CHECK: ![[IMAGE]] = !DILocalVariable(tag: DW_TAG_arg_variable, name: "image"
// 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)