CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
81 lines
3.1 KiB
Objective-C
81 lines
3.1 KiB
Objective-C
// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
|
|
// The DWARF standard says the underlying data type of an enum may be
|
|
// stored in an DW_AT_type entry in the enum DIE. This is useful to have
|
|
// so the debugger knows about the signedness of the underlying type.
|
|
|
|
typedef long NSInteger;
|
|
#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
|
|
|
|
// Enum with no specified underlying type
|
|
typedef enum {
|
|
Enum0One,
|
|
Enum0Two
|
|
} Enum0;
|
|
|
|
// Enum declared with the NS_ENUM macro
|
|
typedef NS_ENUM(NSInteger, Enum1) {
|
|
Enum1One = -1,
|
|
Enum1Two
|
|
};
|
|
|
|
// Enum declared with a fixed underlying type
|
|
typedef enum : NSInteger {
|
|
Enum2One = -1,
|
|
Enum2Two
|
|
} Enum2;
|
|
|
|
// Typedef and declaration separately
|
|
enum : NSInteger
|
|
{
|
|
Enum3One = -1,
|
|
Enum3Two
|
|
};
|
|
typedef NSInteger Enum3;
|
|
|
|
int main(void) {
|
|
Enum0 e0 = Enum0One;
|
|
// CHECK: #dbg_declare({{.*}}, ![[ENUM0:[0-9]+]], !{{.*}})
|
|
Enum1 e1 = Enum1One;
|
|
// CHECK: #dbg_declare({{.*}}, ![[ENUM1:[0-9]+]], !{{.*}})
|
|
Enum2 e2 = Enum2One;
|
|
// CHECK: #dbg_declare({{.*}}, ![[ENUM2:[0-9]+]], !{{.*}})
|
|
Enum3 e3 = Enum3One;
|
|
// CHECK: #dbg_declare({{.*}}, ![[ENUM3:[0-9]+]], !{{.*}})
|
|
|
|
// -Werror and the following line ensures that these enums are not
|
|
// -treated as C++11 strongly typed enums.
|
|
return e0 != e1 && e1 == e2 && e2 == e3;
|
|
}
|
|
// CHECK: ![[ENUMERATOR0:[0-9]+]] = !DICompositeType(tag: DW_TAG_enumeration_type
|
|
// CHECK-SAME: line: 10,
|
|
// CHECK: ![[ENUMERATOR1:[0-9]+]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "Enum1"
|
|
// CHECK-SAME: line: 16
|
|
// CHECK-SAME: baseType: ![[ENUMERATOR3:[0-9]+]]
|
|
// CHECK: ![[ENUMERATOR3]] = !DIDerivedType(tag: DW_TAG_typedef, name: "NSInteger"
|
|
// CHECK-SAME: line: 6
|
|
// CHECK-SAME: baseType: ![[LONGINT:[0-9]+]]
|
|
// CHECK: ![[LONGINT]] = !DIBasicType(name: "long"
|
|
// CHECK: ![[ENUMERATOR2:[0-9]+]] = !DICompositeType(tag: DW_TAG_enumeration_type,
|
|
// CHECK-SAME: line: 22
|
|
// CHECK-SAME: baseType: ![[ENUMERATOR3]]
|
|
|
|
// CHECK: ![[ENUM0]] = !DILocalVariable(name: "e0"
|
|
// CHECK-SAME: type: ![[TYPE0:[0-9]+]]
|
|
// CHECK: ![[TYPE0]] = !DIDerivedType(tag: DW_TAG_typedef, name: "Enum0",
|
|
// CHECK-SAME: baseType: ![[ENUMERATOR0]]
|
|
|
|
// CHECK: ![[ENUM1]] = !DILocalVariable(name: "e1"
|
|
// CHECK-SAME: type: ![[TYPE1:[0-9]+]]
|
|
// CHECK: ![[TYPE1]] = !DIDerivedType(tag: DW_TAG_typedef, name: "Enum1"
|
|
// CHECK-SAME: baseType: ![[ENUMERATOR1]]
|
|
|
|
// CHECK: ![[ENUM2]] = !DILocalVariable(name: "e2"
|
|
// CHECK-SAME: type: ![[TYPE2:[0-9]+]]
|
|
// CHECK: ![[TYPE2]] = !DIDerivedType(tag: DW_TAG_typedef, name: "Enum2"
|
|
// CHECK-SAME: baseType: ![[ENUMERATOR2]]
|
|
|
|
// CHECK: ![[ENUM3]] = !DILocalVariable(name: "e3"
|
|
// CHECK-SAME: type: ![[TYPE3:[0-9]+]]
|
|
// CHECK: ![[TYPE3]] = !DIDerivedType(tag: DW_TAG_typedef, name: "Enum3"
|
|
// CHECK-SAME: baseType: ![[ENUMERATOR3]]
|