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
|
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)]
|
|
|
|
|
|
|
|
enum E { A, B, C }
|
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
let e = E::C;
|
|
|
|
}
|