mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 19:16:05 +00:00

Allegedly the DWARF backend ignores this field of DIEnumerator, but we set it nonetheless in case we decide to use it in the future. Alternatively, we could remove it, but it is simpler to pass down the signed bit as it is in the AST for now. Implemented to address comments on D106585
16 lines
497 B
C
16 lines
497 B
C
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
|
|
|
|
int v;
|
|
enum e { MAX };
|
|
|
|
void foo (void)
|
|
{
|
|
v = MAX;
|
|
}
|
|
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
|
|
// CHECK-SAME: baseType: ![[LONG:[0-9]+]]
|
|
// CHECK-SAME: elements: ![[ELTS:[0-9]+]]
|
|
// CHECK: ![[LONG]] = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
|
|
// CHECK: ![[ELTS]] = !{![[MAX:[0-9]+]]}
|
|
// CHECK: ![[MAX]] = !DIEnumerator(name: "MAX", value: 0)
|