Skip to content

Commit fbac133

Browse files
committed
[parser] update tests to use #setline
1 parent ba9809c commit fbac133

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

test/DebugInfo/inlinedAt.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
// RUN: | FileCheck %s --check-prefix=CHECK-SIL
33
// RUN: %target-swift-frontend %s -O -I %t -emit-ir -g -o - | FileCheck %s
44

5-
#line 100 "abc.swift"
5+
#setline 100 "abc.swift"
66
@inline(__always)
77
func h(k : Int) -> Int { // 101
88
return k // 102
99
}
1010

11-
#line 200 "abc.swift"
11+
#setline 200 "abc.swift"
1212
@inline(__always)
1313
func g(j : Int) -> Int { // 201
1414
return h(j) // 202
1515
}
1616

17-
#line 301 "abc.swift"
17+
#setline 301 "abc.swift"
1818
public func f(i : Int) -> Int { // 301
1919
return g(i) // 302
2020
}

test/DebugInfo/line-directive.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
func markUsed<T>(t: T) {}
22
func f() {
33
if 1==1 {
4-
#line 42 "abc.swift"
4+
#setline 42 "abc.swift"
55
markUsed("Hello World")
6-
#line
6+
#setline
77
}
88
markUsed("Test")
9-
#line 142 "abc.swift"
9+
#setline 142 "abc.swift"
1010
markUsed("abc again")
11-
#line 142 "def.swift"
11+
#setline 142 "def.swift"
1212
markUsed("jump directly to def")
1313
}
1414

test/Parse/line-directive.swift

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

33
let x = 0 // We need this because of the #line-ends-with-a-newline requirement.
44

5-
#line
5+
#setline
66
x // expected-error {{parameterless closing #line directive}}
77

8-
#line 0 "x" // expected-error{{the line number needs to be greater}}
8+
#setline 0 "x" // expected-error{{the line number needs to be greater}}
99

10-
#line -1 "x" // expected-error{{expected starting line number}}
10+
#setline -1 "x" // expected-error{{expected starting line number}}
1111

12-
#line 1.5 "x" // expected-error{{expected starting line number}}
12+
#setline 1.5 "x" // expected-error{{expected starting line number}}
1313

14-
#line 1 x.swift // expected-error{{expected filename string literal}}
14+
#setline 1 x.swift // expected-error{{expected filename string literal}}
1515

16-
#line 42 "x.swift"
16+
#setline 42 "x.swift"
1717
x x ; // should be ignored by expected_error because it is in a different file
1818
x
19-
#line
19+
#setline
2020
x
2121
x x // expected-error{{consecutive statements}} {{2-2=;}}
2222

0 commit comments

Comments
 (0)