In order to make sure that Rust's bitflags types are passed the same
way in the Rust ABI as they are in the C ABI, we need to use the attribute
repr(transparent) over the repr(C) attribute for the single-field bitflags
structs in in order to prevent ABI mismatches. Thanks to Michael Karcher
for finding this bug.
Gbp-Pq: Name u-sparc64-ffi-abi.patch
// These values **must** match with LLVMRustDIFlags!!
bitflags! {
- #[repr(C)]
+ #[repr(transparent)]
#[derive(Default)]
pub struct DIFlags: ::libc::uint32_t {
const FlagZero = 0;
// These values **must** match with LLVMRustDISPFlags!!
bitflags! {
- #[repr(C)]
+ #[repr(transparent)]
#[derive(Default)]
pub struct DISPFlags: ::libc::uint32_t {
const SPFlagZero = 0;