Debian Codegraph @

clang/test/DebugInfo/Generic/unused_nested_enump.cpp

raw
1 // RUN: %clang_cc1 -debug-info-kind=unused-types -emit-llvm -o - %s | FileCheck %s
2 // RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck --check-prefix=NOUNUSEDTYPE %s
3
4 struct Type {
5 enum { Unused };
6 int value = 0;
7 };
8 int main() {
9 Type t;
10 return t.value;
11 }
12
13 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type
14 // CHECK-SAME: scope: ![[STRUCT:[0-9]+]]
15 // CHECK-SAME: elements: ![[ELEMENTS:[0-9]+]]
16
17 // CHECK: ![[STRUCT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Type"
18
19 // CHECK: ![[ELEMENTS]] = !{![[ENUMERATOR:[0-9]+]]}
20 // CHECK: ![[ENUMERATOR]] = !DIEnumerator(name: "Unused", value: 0
21
22
23 // NOUNUSEDTYPE-NOT: !DIEnumerator(name: "Unused"