2020-04-14 19:10:58 +00: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 16:08:59 +00:00
|
|
|
|
2021-04-03 11:05:11 +00:00
|
|
|
//
|
2020-04-14 19:10:58 +00:00
|
|
|
// ignore-msvc
|
2018-09-07 16:08:59 +00:00
|
|
|
|
|
|
|
// compile-flags: -g -C no-prepopulate-passes
|
|
|
|
|
|
|
|
// CHECK-LABEL: @main
|
2020-04-14 19:10:58 +00:00
|
|
|
// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_enumeration_type,{{.*}}name: "E",{{.*}}flags: DIFlagEnumClass,{{.*}}
|
2018-09-07 16:08:59 +00: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;
|
|
|
|
}
|