Files
swift-mirror/test/DebugInfo/Constructors.swift
Bob Wilson 5e16a652b5 master-next: Update DebugInfo tests for llvm r347806
Check for the DISPFlagDefinition flag instead of "isDefinition: true".
2019-02-08 14:22:56 -08:00

14 lines
441 B
Swift

// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
struct Foo {
// Allocating constructor - should have no line table info.
// CHECK: !DISubprogram(name: "init", linkageName: "$s12Constructors3FooV1xACs5Int64V_tcfC",
// CHECK-SAME: line: [[@LINE+3]]
// CHECK-NOT: scopeLine: 0
// CHECK-SAME: DISPFlagDefinition
init(x: Int64) {}
func bar(_ x: Int64) {}
}
var f = Foo(x: 1)
f.bar(2)