]> git.lizzy.rs Git - rust.git/blob - tests/codegen/enum-debug-clike.rs
Rollup merge of #106648 - Nilstrieb:poly-cleanup, r=compiler-errors
[rust.git] / tests / codegen / enum-debug-clike.rs
1 // This tests that debug info for "c-like" enums is properly emitted.
2 // This is ignored for the fallback mode on MSVC due to problems with PDB.
3
4 //
5 // ignore-msvc
6
7 // compile-flags: -g -C no-prepopulate-passes
8
9 // CHECK-LABEL: @main
10 // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_enumeration_type,{{.*}}name: "E",{{.*}}flags: DIFlagEnumClass,{{.*}}
11 // CHECK: {{.*}}DIEnumerator{{.*}}name: "A",{{.*}}value: {{[0-9].*}}
12 // CHECK: {{.*}}DIEnumerator{{.*}}name: "B",{{.*}}value: {{[0-9].*}}
13 // CHECK: {{.*}}DIEnumerator{{.*}}name: "C",{{.*}}value: {{[0-9].*}}
14
15 #![allow(dead_code)]
16 #![allow(unused_variables)]
17 #![allow(unused_assignments)]
18
19 enum E { A, B, C }
20
21 pub fn main() {
22     let e = E::C;
23 }