about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-04-17 08:42:51 +0000
committerbors <bors@rust-lang.org>2020-04-17 08:42:51 +0000
commitb2c1a606feb1fbdb0ac0acba76f881ef172ed474 (patch)
tree18874526814851b0fb67cd67d41759720bf5d18e /src/librustc_codegen_llvm
parent861996e13820a2e401df60756a373606b50948e5 (diff)
parent8f081d5b2bd92f621f2db6841971e7c38e0e8f26 (diff)
Auto merge of #70629 - anyska:fields-variant, r=oli-obk
rustc_target::abi: add Primitive variant to FieldsShape.

Originally suggested by @eddyb.
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/type_of.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/type_of.rs b/src/librustc_codegen_llvm/type_of.rs
index f475ea741c8..77009aca6d3 100644
--- a/src/librustc_codegen_llvm/type_of.rs
+++ b/src/librustc_codegen_llvm/type_of.rs
@@ -81,7 +81,7 @@ fn uncached_llvm_type<'a, 'tcx>(
     };
 
     match layout.fields {
-        FieldsShape::Union(_) => {
+        FieldsShape::Primitive | FieldsShape::Union(_) => {
             let fill = cx.type_padding_filler(layout.size, layout.align.abi);
             let packed = false;
             match name {
@@ -368,7 +368,7 @@ impl<'tcx> LayoutLlvmExt<'tcx> for TyAndLayout<'tcx> {
             _ => {}
         }
         match self.fields {
-            FieldsShape::Union(_) => {
+            FieldsShape::Primitive | FieldsShape::Union(_) => {
                 bug!("TyAndLayout::llvm_field_index({:?}): not applicable", self)
             }