2020-04-14 14:10:58 -05:00
|
|
|
// This tests that debug info for tagged (ordinary) enums is properly emitted.
|
|
|
|
// This is ignored for the fallback mode on MSVC due to problems with PDB.
|
2017-11-29 15:42:25 -06:00
|
|
|
|
2020-04-14 14:10:58 -05:00
|
|
|
// ignore-msvc
|
2017-11-29 15:42:25 -06:00
|
|
|
|
|
|
|
// compile-flags: -g -C no-prepopulate-passes
|
|
|
|
|
|
|
|
// CHECK-LABEL: @main
|
2018-09-07 11:08:59 -05:00
|
|
|
// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_structure_type,{{.*}}name: "E",{{.*}}
|
2017-11-29 15:42:25 -06:00
|
|
|
// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_variant_part,{{.*}}discriminator:{{.*}}
|
|
|
|
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "A",{{.*}}extraData:{{.*}}
|
|
|
|
// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_structure_type,{{.*}}name: "A",{{.*}}
|
2018-09-07 11:08:59 -05:00
|
|
|
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "__0",{{.*}}
|
2017-11-29 15:42:25 -06:00
|
|
|
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "B",{{.*}}extraData:{{.*}}
|
|
|
|
// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_structure_type,{{.*}}name: "B",{{.*}}
|
2018-09-07 11:08:59 -05:00
|
|
|
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "__0",{{.*}}
|
2018-09-07 10:42:02 -05:00
|
|
|
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}flags: DIFlagArtificial{{.*}}
|
2017-11-29 15:42:25 -06:00
|
|
|
|
|
|
|
#![allow(dead_code)]
|
|
|
|
#![allow(unused_variables)]
|
|
|
|
#![allow(unused_assignments)]
|
|
|
|
|
2018-09-07 11:08:59 -05:00
|
|
|
enum E { A(u32), B(u32) }
|
2017-11-29 15:42:25 -06:00
|
|
|
|
|
|
|
pub fn main() {
|
2018-09-07 11:08:59 -05:00
|
|
|
let e = E::A(23);
|
2017-11-29 15:42:25 -06:00
|
|
|
}
|