Add codegen test to validate IR for debuginfo
This commit is contained in:
parent
2f00b6affd
commit
5b23c38dd5
1 changed files with 11 additions and 0 deletions
11
tests/codegen/issue-98678.rs
Normal file
11
tests/codegen/issue-98678.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
// This test verifies the accuracy of emitted file and line debuginfo metadata.
|
||||
//
|
||||
// compile-flags: -C debuginfo=2
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// CHECK: ![[#FILE:]] = !DIFile({{.*}}filename:{{.*}}src/test/codegen/issue-98678.rs{{".*}})
|
||||
|
||||
// CHECK: !DICompositeType({{.*"}}MyType{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
|
||||
pub struct MyType;
|
||||
|
||||
pub fn foo(_: MyType) {}
|
Loading…
Add table
Add a link
Reference in a new issue