2020-04-14 14:10:58 -05:00
|
|
|
// This tests that debug info for "c-like" enums is properly emitted.
|
|
|
|
// This is ignored for the fallback mode on MSVC due to problems with PDB.
|
2018-09-07 11:08:59 -05:00
|
|
|
|
2021-04-03 06:05:11 -05:00
|
|
|
//
|
2020-04-14 14:10:58 -05:00
|
|
|
//@ ignore-msvc
|
2024-03-06 14:44:54 -06:00
|
|
|
//@ ignore-wasi wasi codegens the main symbol differently
|
2018-09-07 11:08:59 -05:00
|
|
|
|
|
|
|
//@ compile-flags: -g -C no-prepopulate-passes
|
|
|
|
|
|
|
|
// CHECK-LABEL: @main
|
2020-04-14 14:10:58 -05:00
|
|
|
// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_enumeration_type,{{.*}}name: "E",{{.*}}flags: DIFlagEnumClass,{{.*}}
|
2018-09-07 11:08:59 -05:00
|
|
|
// CHECK: {{.*}}DIEnumerator{{.*}}name: "A",{{.*}}value: {{[0-9].*}}
|
|
|
|
// CHECK: {{.*}}DIEnumerator{{.*}}name: "B",{{.*}}value: {{[0-9].*}}
|
|
|
|
// CHECK: {{.*}}DIEnumerator{{.*}}name: "C",{{.*}}value: {{[0-9].*}}
|
|
|
|
|
|
|
|
#![allow(dead_code)]
|
|
|
|
#![allow(unused_variables)]
|
|
|
|
#![allow(unused_assignments)]
|
|
|
|
|
2024-05-28 23:11:20 -05:00
|
|
|
enum E {
|
|
|
|
A,
|
|
|
|
B,
|
|
|
|
C,
|
|
|
|
}
|
2018-09-07 11:08:59 -05:00
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
let e = E::C;
|
|
|
|
}
|