]> git.lizzy.rs Git - rust.git/commit
auto merge of #20060 : Aatch/rust/enum-repr, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 24 Dec 2014 16:21:23 +0000 (16:21 +0000)
committerbors <bors@rust-lang.org>
Wed, 24 Dec 2014 16:21:23 +0000 (16:21 +0000)
commit29ad8539b9c408eebbe7252f74c754f4e0a41d46
tree0eb0bd2ba9a26f65d34680724c313320471af3eb
parente64a8193b02ce72ef183274994a25eae281cb89c
parentb473311ad8161c8d16412acb54f4188e737e4ca4
auto merge of #20060 : Aatch/rust/enum-repr, r=alexcrichton

The previous behaviour of using the smallest type possible caused LLVM
to treat padding too conservatively, causing poor codegen. This commit
changes the behaviour to use an alignment-sized integer as the
discriminant. This keeps types the same size, but helps LLVM understand
the data structure a little better, resulting in better codegen.
src/librustc_trans/trans/adt.rs