From ce290514df95113a51346b0bd046c0436b9cc92b Mon Sep 17 00:00:00 2001 From: Wesley Wiser Date: Wed, 13 Dec 2023 11:46:28 -0600 Subject: [PATCH] Adapt debug-accessibility tests for msvc-style enums --- tests/codegen/debug-accessibility/crate-enum.rs | 4 +++- tests/codegen/debug-accessibility/private-enum.rs | 4 +++- tests/codegen/debug-accessibility/public-enum.rs | 4 +++- tests/codegen/debug-accessibility/super-enum.rs | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/codegen/debug-accessibility/crate-enum.rs b/tests/codegen/debug-accessibility/crate-enum.rs index 0e10c7c9a68..eeea18dd815 100644 --- a/tests/codegen/debug-accessibility/crate-enum.rs +++ b/tests/codegen/debug-accessibility/crate-enum.rs @@ -1,4 +1,5 @@ // compile-flags: -C debuginfo=2 +// ignore-tidy-linelength #![allow(dead_code)] @@ -13,7 +14,8 @@ mod module { C { x: u32 }, } - // CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "CrateFooEnum"{{.*}}flags: DIFlagProtected{{.*}}) + // NONMSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "CrateFooEnum"{{.*}}flags: DIFlagProtected{{.*}}) + // MSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$"{{.*}}flags: DIFlagProtected{{.*}}) pub fn use_everything() { black_box(CrateFooEnum::A); } diff --git a/tests/codegen/debug-accessibility/private-enum.rs b/tests/codegen/debug-accessibility/private-enum.rs index d39f8dca328..7f81026ddec 100644 --- a/tests/codegen/debug-accessibility/private-enum.rs +++ b/tests/codegen/debug-accessibility/private-enum.rs @@ -1,4 +1,5 @@ // compile-flags: -C debuginfo=2 +// ignore-tidy-linelength #![allow(dead_code)] @@ -12,7 +13,8 @@ enum PrivateFooEnum { C { x: u32 }, } -// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PrivateFooEnum"{{.*}}flags: DIFlagPrivate{{.*}}) +// NONMSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PrivateFooEnum"{{.*}}flags: DIFlagPrivate{{.*}}) +// MSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$"{{.*}}flags: DIFlagPrivate{{.*}}) fn main() { black_box(PrivateFooEnum::A); diff --git a/tests/codegen/debug-accessibility/public-enum.rs b/tests/codegen/debug-accessibility/public-enum.rs index b2fe87b8ad8..29ae5fd6421 100644 --- a/tests/codegen/debug-accessibility/public-enum.rs +++ b/tests/codegen/debug-accessibility/public-enum.rs @@ -1,4 +1,5 @@ // compile-flags: -C debuginfo=2 +// ignore-tidy-linelength #![allow(dead_code)] @@ -12,7 +13,8 @@ pub enum PublicFooEnum { C { x: u32 }, } -// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PublicFooEnum"{{.*}}flags: DIFlagPublic{{.*}}) +// NONMSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PublicFooEnum"{{.*}}flags: DIFlagPublic{{.*}}) +// MSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$"{{.*}}flags: DIFlagPublic{{.*}}) fn main() { black_box(PublicFooEnum::A); diff --git a/tests/codegen/debug-accessibility/super-enum.rs b/tests/codegen/debug-accessibility/super-enum.rs index 12161557d77..9d83fb45bd0 100644 --- a/tests/codegen/debug-accessibility/super-enum.rs +++ b/tests/codegen/debug-accessibility/super-enum.rs @@ -1,4 +1,5 @@ // compile-flags: -C debuginfo=2 +// ignore-tidy-linelength #![allow(dead_code)] @@ -13,7 +14,8 @@ mod module { C { x: u32 }, } - // CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "SuperFooEnum"{{.*}}flags: DIFlagProtected{{.*}}) + // NONMSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "SuperFooEnum"{{.*}}flags: DIFlagProtected{{.*}}) + // MSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$"{{.*}}flags: DIFlagProtected{{.*}}) pub fn use_everything() { black_box(SuperFooEnum::A);