brintos

brintos / llvm-project-archived public Read only

0
0
Text · 704 B · 7689b5b Raw
24 lines · cpp
1// RUN: %clang_cc1 -debug-info-kind=unused-types  -emit-llvm -o - %s | FileCheck %s2// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck --check-prefix=NOUNUSEDTYPE %s3 4struct Type {5    enum { Unused };6    int value = 0;7};8int main() {9    Type t;10    return t.value;11}12 13// CHECK:  !DICompositeType(tag: DW_TAG_enumeration_type14// 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: 021 22 23// NOUNUSEDTYPE-NOT: !DIEnumerator(name: "Unused"24