@@ -1495,10 +1495,6 @@ impl EnumMemberDescriptionFactory<'ll, 'tcx> {
14951495 } else {
14961496 type_metadata ( cx, self . enum_type , self . span )
14971497 } ;
1498- let flags = match self . enum_type . kind ( ) {
1499- ty:: Generator ( ..) => DIFlags :: FlagArtificial ,
1500- _ => DIFlags :: FlagZero ,
1501- } ;
15021498
15031499 match self . layout . variants {
15041500 Variants :: Single { index } => {
@@ -1533,7 +1529,7 @@ impl EnumMemberDescriptionFactory<'ll, 'tcx> {
15331529 offset: Size :: ZERO ,
15341530 size: self . layout. size,
15351531 align: self . layout. align. abi,
1536- flags,
1532+ flags: DIFlags :: FlagZero ,
15371533 discriminant: None ,
15381534 source_info: variant_info. source_info( cx) ,
15391535 } ]
@@ -1588,7 +1584,7 @@ impl EnumMemberDescriptionFactory<'ll, 'tcx> {
15881584 offset : Size :: ZERO ,
15891585 size : self . layout . size ,
15901586 align : self . layout . align . abi ,
1591- flags,
1587+ flags : DIFlags :: FlagZero ,
15921588 discriminant : Some (
15931589 self . layout . ty . discriminant_for_variant ( cx. tcx , i) . unwrap ( ) . val
15941590 as u64 ,
@@ -1672,7 +1668,7 @@ impl EnumMemberDescriptionFactory<'ll, 'tcx> {
16721668 offset: Size :: ZERO ,
16731669 size: variant. size,
16741670 align: variant. align. abi,
1675- flags,
1671+ flags: DIFlags :: FlagZero ,
16761672 discriminant: None ,
16771673 source_info: variant_info. source_info( cx) ,
16781674 } ]
@@ -1723,7 +1719,7 @@ impl EnumMemberDescriptionFactory<'ll, 'tcx> {
17231719 offset : Size :: ZERO ,
17241720 size : self . layout . size ,
17251721 align : self . layout . align . abi ,
1726- flags,
1722+ flags : DIFlags :: FlagZero ,
17271723 discriminant : niche_value,
17281724 source_info : variant_info. source_info ( cx) ,
17291725 }
@@ -1855,13 +1851,6 @@ impl<'tcx> VariantInfo<'_, 'tcx> {
18551851 }
18561852 None
18571853 }
1858-
1859- fn is_artificial ( & self ) -> bool {
1860- match self {
1861- VariantInfo :: Generator { .. } => true ,
1862- VariantInfo :: Adt ( ..) => false ,
1863- }
1864- }
18651854}
18661855
18671856/// Returns a tuple of (1) `type_metadata_stub` of the variant, (2) a
@@ -1887,8 +1876,7 @@ fn describe_enum_variant(
18871876 & variant_name,
18881877 unique_type_id,
18891878 Some ( containing_scope) ,
1890- // FIXME(tmandry): This doesn't seem to have any effect.
1891- if variant. is_artificial ( ) { DIFlags :: FlagArtificial } else { DIFlags :: FlagZero } ,
1879+ DIFlags :: FlagZero ,
18921880 )
18931881 } ) ;
18941882
@@ -1951,11 +1939,6 @@ fn prepare_enum_metadata(
19511939) -> RecursiveTypeDescription < ' ll , ' tcx > {
19521940 let tcx = cx. tcx ;
19531941 let enum_name = compute_debuginfo_type_name ( tcx, enum_type, false ) ;
1954- // FIXME(tmandry): This doesn't seem to have any effect.
1955- let enum_flags = match enum_type. kind ( ) {
1956- ty:: Generator ( ..) => DIFlags :: FlagArtificial ,
1957- _ => DIFlags :: FlagZero ,
1958- } ;
19591942
19601943 let containing_scope = get_namespace_for_item ( cx, enum_def_id) ;
19611944 // FIXME: This should emit actual file metadata for the enum, but we
@@ -2088,7 +2071,7 @@ fn prepare_enum_metadata(
20882071 UNKNOWN_LINE_NUMBER ,
20892072 layout. size . bits ( ) ,
20902073 layout. align . abi . bits ( ) as u32 ,
2091- enum_flags ,
2074+ DIFlags :: FlagZero ,
20922075 None ,
20932076 0 , // RuntimeLang
20942077 unique_type_id_str. as_ptr ( ) . cast ( ) ,
@@ -2210,7 +2193,7 @@ fn prepare_enum_metadata(
22102193 UNKNOWN_LINE_NUMBER ,
22112194 layout. size . bits ( ) ,
22122195 layout. align . abi . bits ( ) as u32 ,
2213- enum_flags ,
2196+ DIFlags :: FlagZero ,
22142197 discriminator_metadata,
22152198 empty_array,
22162199 variant_part_unique_type_id_str. as_ptr ( ) . cast ( ) ,
@@ -2239,7 +2222,7 @@ fn prepare_enum_metadata(
22392222 UNKNOWN_LINE_NUMBER ,
22402223 layout. size . bits ( ) ,
22412224 layout. align . abi . bits ( ) as u32 ,
2242- enum_flags ,
2225+ DIFlags :: FlagZero ,
22432226 None ,
22442227 type_array,
22452228 0 ,
0 commit comments