File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/librustc_codegen_llvm/debuginfo Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1161,6 +1161,7 @@ fn prepare_union_metadata(
1161
1161
// offset of zero bytes).
1162
1162
struct EnumMemberDescriptionFactory < ' ll , ' tcx > {
1163
1163
enum_type : Ty < ' tcx > ,
1164
+ enum_type_size : Size ,
1164
1165
layout : TyLayout < ' tcx > ,
1165
1166
discriminant_type_metadata : Option < & ' ll DIType > ,
1166
1167
containing_scope : & ' ll DIScope ,
@@ -1222,7 +1223,7 @@ impl EnumMemberDescriptionFactory<'ll, 'tcx> {
1222
1223
name : "" . to_string ( ) ,
1223
1224
type_metadata : variant_type_metadata,
1224
1225
offset : Size :: ZERO ,
1225
- size : variant . size ,
1226
+ size : self . enum_type_size ,
1226
1227
align : variant. align ,
1227
1228
flags : DIFlags :: FlagZero
1228
1229
}
@@ -1508,6 +1509,7 @@ fn prepare_enum_metadata(
1508
1509
enum_metadata,
1509
1510
EnumMDF ( EnumMemberDescriptionFactory {
1510
1511
enum_type,
1512
+ enum_type_size,
1511
1513
layout,
1512
1514
discriminant_type_metadata,
1513
1515
containing_scope,
You can’t perform that action at this time.
0 commit comments