]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/enum-debug-clike.rs
Rollup merge of #56425 - scottmcm:redo-vec-set_len-docs, r=Centril
[rust.git] / src / test / codegen / enum-debug-clike.rs
1 // This test depends on a patch that was committed to upstream LLVM
2 // before 7.0, then backported to the Rust LLVM fork.  It tests that
3 // debug info for "c-like" enums is properly emitted.
4
5 // ignore-tidy-linelength
6 // ignore-windows
7 // min-system-llvm-version 7.0
8
9 // compile-flags: -g -C no-prepopulate-passes
10
11 // CHECK-LABEL: @main
12 // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_enumeration_type,{{.*}}name: "E",{{.*}}flags: DIFlagFixedEnum,{{.*}}
13 // CHECK: {{.*}}DIEnumerator{{.*}}name: "A",{{.*}}value: {{[0-9].*}}
14 // CHECK: {{.*}}DIEnumerator{{.*}}name: "B",{{.*}}value: {{[0-9].*}}
15 // CHECK: {{.*}}DIEnumerator{{.*}}name: "C",{{.*}}value: {{[0-9].*}}
16
17 #![allow(dead_code)]
18 #![allow(unused_variables)]
19 #![allow(unused_assignments)]
20
21 enum E { A, B, C }
22
23 pub fn main() {
24     let e = E::C;
25 }