2020-04-14 19:10:58 +00:00
|
|
|
// This tests that optimized enum debug info accurately reflects the enum layout.
|
|
|
|
// This is ignored for the fallback mode on MSVC due to problems with PDB.
|
2017-11-29 21:42:25 +00:00
|
|
|
|
2020-04-14 19:10:58 +00:00
|
|
|
// ignore-msvc
|
2017-11-29 21:42:25 +00:00
|
|
|
|
|
|
|
// compile-flags: -g -C no-prepopulate-passes
|
|
|
|
|
|
|
|
// CHECK-LABEL: @main
|
|
|
|
// 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",{{.*}}
|
|
|
|
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "B",{{.*}}extraData:{{.*}}
|
|
|
|
// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_structure_type,{{.*}}name: "B",{{.*}}
|
|
|
|
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "C",{{.*}}extraData:{{.*}}
|
|
|
|
// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_structure_type,{{.*}}name: "C",{{.*}}
|
2018-09-07 15:42:02 +00:00
|
|
|
// CHECK-NOT: {{.*}}DIDerivedType{{.*}}name: "D",{{.*}}extraData:{{.*}}
|
2017-11-29 21:42:25 +00:00
|
|
|
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "D",{{.*}}
|
|
|
|
// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_structure_type,{{.*}}name: "D",{{.*}}
|
2018-09-07 15:42:02 +00:00
|
|
|
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}flags: DIFlagArtificial{{.*}}
|
2017-11-29 21:42:25 +00:00
|
|
|
|
|
|
|
#![allow(dead_code)]
|
|
|
|
#![allow(unused_variables)]
|
|
|
|
#![allow(unused_assignments)]
|
|
|
|
|
|
|
|
enum E { A, B, C, D(bool) }
|
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
let e = E::D(true);
|
|
|
|
}
|