Files
swift-mirror/test/DebugInfo/Constructors.swift
Erik Eckstein 1d3724666f tests: convert about 400 tests to the new mangling by using the -new-mangling-for-tests option
When the new mangling is enabled permanently, the option can be removed from the RUN command lines again.
2017-01-24 15:27:45 -08:00

14 lines
473 B
Swift

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