2021-04-06 15:00:35 -05:00
|
|
|
// Verify that the only debuginfo generated are the line tables.
|
|
|
|
//
|
|
|
|
//@ compile-flags: -C debuginfo=line-tables-only
|
|
|
|
|
|
|
|
#[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
|