librustc_codegen_llvm: Use repr(transparent) for bitflags over repr(C) (#61306)
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Sun, 16 Jun 2019 00:53:33 +0000 (02:53 +0200)
committerXimin Luo <infinity0@debian.org>
Thu, 18 Jul 2019 01:25:06 +0000 (02:25 +0100)
commitdf69381d4b4183add7195338e260f245f8dfb8f1
tree8e93c99474e9a96f608a5b0eee96198b3877dd4c
parent9f781b2c1734305af3207af57fce618f1ca469a7
librustc_codegen_llvm: Use repr(transparent) for bitflags over repr(C) (#61306)

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
src/librustc_codegen_llvm/llvm/ffi.rs