2021-04-06 15:00:35 -05:00
|
|
|
// Verify that the only debuginfo generated are the line tables.
|
|
|
|
//
|
2024-02-22 06:10:29 -06:00
|
|
|
//@ compile-flags: -C debuginfo=line-tables-only
|
2021-04-06 15:00:35 -05:00
|
|
|
|
|
|
|
#[repr(C)]
|
|
|
|
struct StructType {
|
|
|
|
a: i64,
|
2021-09-03 12:00:39 -05:00
|
|
|
b: i32,
|
2021-04-06 15:00:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
fn creator() -> *mut StructType;
|
|
|
|
fn save(p: *const StructType);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
2021-09-03 12:00:39 -05:00
|
|
|
let value: &mut StructType = &mut *creator();
|
2021-04-06 15:00:35 -05:00
|
|
|
value.a = 7;
|
|
|
|
save(value as *const StructType)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: !DICompileUnit
|
|
|
|
// CHECK: emissionKind: LineTablesOnly
|
|
|
|
// CHECK: !DILocation
|
|
|
|
// CHECK-NOT: !DIBasicType
|