2021-04-06 15:00:35 -05:00
|
|
|
// Verify that the only debuginfo generated are the line directives.
|
|
|
|
//
|
|
|
|
// compile-flags: -C debuginfo=line-directives-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: DebugDirectivesOnly
|
|
|
|
// CHECK: !DILocation
|
|
|
|
// CHECK-NOT: !DIBasicType
|