Skip to content

Commit 64dd582

Browse files
wesleywisermweber15
authored andcommitted
Use -DAG to handle use of file before definition
Also fixup the test assertion for msvc and unix
1 parent 613ddc1 commit 64dd582

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/codegen/issues/issue-98678-closure-coroutine.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
// ignore-tidy-linelength
88

9-
// NONMSVC: ![[#FILE:]] = !DIFile({{.*}}filename:{{.*}}/issue-98678-closure-coroutine.rs{{".*}})
10-
// MSVC: ![[#FILE:]] = !DIFile({{.*}}filename:{{.*}}\\issue-98678-closure-coroutine.rs{{".*}})
9+
// NONMSVC-DAG: ![[#FILE:]] = !DIFile({{.*}}filename:{{.*}}/issue-98678-closure-coroutine.rs{{".*}})
10+
// MSVC-DAG: ![[#FILE:]] = !DIFile({{.*}}filename:{{.*}}\\issue-98678-closure-coroutine.rs{{".*}})
1111

1212
pub fn foo() {
1313
// NONMSVC-DAG: !DICompositeType({{.*"}}{closure_env#0}{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 2]],
1414
// MSVC-DAG: !DICompositeType({{.*"}}closure_env$0{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
1515
let closure = |x| x;
1616
closure(0);
1717

18-
// NONMSVC-DAG: !DISubprogram({{.*"[{]}}coroutine_env#1{{[}]".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 2]],
19-
// MSVC-DAG: !DISubprogram({{.*".*foo::}}coroutine_env$1>{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
18+
// NONMSVC-DAG: !DICompositeType({{.*"[{]}}coroutine_env#1{{[}]".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 2]],
19+
// MSVC-DAG: !DICompositeType({{.*".*foo::}}coroutine_env$1>{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
2020
let _coroutine = #[coroutine]
2121
|| yield 1;
2222
}

0 commit comments

Comments
 (0)