Skip to content

Commit bfd8413

Browse files
committed
Simplify this testcase while making it stricter.
1 parent 2e16045 commit bfd8413

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

test/DebugInfo/protocolarg.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22

33
func markUsed<T>(t: T) {}
44

5-
// FIXME: Should be DW_TAG_interface_type
6-
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "IGiveOutInts"
7-
// CHECK-SAME: identifier: [[PT:"[^"]+"]]
8-
protocol IGiveOutInts {
5+
public protocol IGiveOutInts {
96
func callMe() -> Int64
107
}
118

12-
class SomeImplementor : IGiveOutInts {
13-
init() {}
14-
func callMe() -> Int64 { return 1 }
15-
}
9+
// CHECK: define {{.*}}@_TF11protocolarg16printSomeNumbersFPS_12IGiveOutInts_T_
10+
// CHECK: @llvm.dbg.declare(metadata %P11protocolarg12IGiveOutInts_* %
11+
// CHECK-SAME: metadata ![[VAR:.*]], metadata ![[EMPTY:.*]])
12+
// CHECK: @llvm.dbg.declare(metadata %P11protocolarg12IGiveOutInts_** %
13+
// CHECK-SAME: metadata ![[ARG:.*]], metadata ![[DEREF:.*]])
14+
15+
// FIXME: Should be DW_TAG_interface_type
16+
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "IGiveOutInts"
17+
// CHECK-SAME: identifier: [[PT:"[^"]+"]]
1618

17-
func printSomeNumbers(gen: IGiveOutInts) {
19+
public func printSomeNumbers(gen: IGiveOutInts) {
1820
var gen = gen
19-
// CHECK: !DILocalVariable(name: "gen", scope{{.*}} line: [[@LINE-1]]
20-
// CHECK: !DILocalVariable(name: "gen", arg: 1{{.*}} line: [[@LINE-3]]
21-
// CHECK-SAME: type: ![[PT]]
21+
// CHECK: ![[EMPTY]] = !DIExpression()
22+
// CHECK: ![[VAR]] = !DILocalVariable(name: "gen", {{.*}} line: [[@LINE-2]]
23+
// CHECK: ![[ARG]] = !DILocalVariable(name: "gen", arg: 1,
24+
// CHECK-SAME: line: [[@LINE-5]], type: ![[PT]]
25+
// CHECK: ![[DEREF]] = !DIExpression(DW_OP_deref)
2226
markUsed(gen.callMe())
2327
}
2428

25-
var i1 : IGiveOutInts = SomeImplementor()
26-
27-
printSomeNumbers(i1)
28-

0 commit comments

Comments
 (0)