2021-04-06 20:00:35 +00: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 17:00:39 +00:00
|
|
|
b: i32,
|
2021-04-06 20:00:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
fn creator() -> *mut StructType;
|
|
|
|
fn save(p: *const StructType);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
2021-09-03 17:00:39 +00:00
|
|
|
let value: &mut StructType = &mut *creator();
|
2021-04-06 20:00:35 +00:00
|
|
|
value.a = 7;
|
|
|
|
save(value as *const StructType)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: !DICompileUnit
|
|
|
|
// CHECK: emissionKind: LineTablesOnly
|
|
|
|
// CHECK: !DILocation
|
|
|
|
// CHECK-NOT: !DIBasicType
|