Skip to content

Commit fe32b95

Browse files
committed
Add codegen test to validate IR for debuginfo
1 parent eca8599 commit fe32b95

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/codegen/issue-98678.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// This test verifies the accuracy of emitted file and line debuginfo metadata.
2+
//
3+
// compile-flags: -C debuginfo=2
4+
#![crate_type = "lib"]
5+
6+
// CHECK: ![[#FILE:]] = !DIFile({{.*}}filename:{{.*}}src/test/codegen/issue-98678.rs{{".*}})
7+
8+
// CHECK: !DICompositeType({{.*"}}MyType{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
9+
pub struct MyType;
10+
11+
pub fn foo(_: MyType) {}

0 commit comments

Comments
 (0)