style: Workaround LLVM ABI bug.

All the gory details in https://bugzilla.mozilla.org/show_bug.cgi?id=1600735 and
related LLVM / GCC bugs. Avoid the issue by forcing the relevant enum to be
32-bit wide, so as to not trigger the LLVM bug.

Differential Revision: https://phabricator.services.mozilla.com/D57868
This commit is contained in:
Emilio Cobos Álvarez 2019-12-19 20:43:06 +00:00
parent 2b499e4850
commit d3e65000be
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A

View file

@ -1803,8 +1803,11 @@ impl ToCss for PropertyId {
} }
/// The counted unknown property list which is used for css use counters. /// The counted unknown property list which is used for css use counters.
///
/// FIXME: This should be just #[repr(u8)], but can't be because of ABI issues,
/// see https://bugs.llvm.org/show_bug.cgi?id=44228.
#[derive(Clone, Copy, Debug, Eq, FromPrimitive, Hash, PartialEq)] #[derive(Clone, Copy, Debug, Eq, FromPrimitive, Hash, PartialEq)]
#[repr(u8)] #[repr(u32)]
pub enum CountedUnknownProperty { pub enum CountedUnknownProperty {
% for prop in data.counted_unknown_properties: % for prop in data.counted_unknown_properties:
/// ${prop.name} /// ${prop.name}