Adapt debug-accessibility tests for msvc-style enums

This commit is contained in:
Wesley Wiser 2023-12-13 11:46:28 -06:00 committed by David Wood
parent 07931c5a08
commit ce290514df
No known key found for this signature in database
4 changed files with 12 additions and 4 deletions

View File

@ -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$<crate_enum::module::CrateFooEnum>"{{.*}}flags: DIFlagProtected{{.*}})
pub fn use_everything() {
black_box(CrateFooEnum::A);
}

View File

@ -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$<private_enum::PrivateFooEnum>"{{.*}}flags: DIFlagPrivate{{.*}})
fn main() {
black_box(PrivateFooEnum::A);

View File

@ -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$<public_enum::PublicFooEnum>"{{.*}}flags: DIFlagPublic{{.*}})
fn main() {
black_box(PublicFooEnum::A);

View File

@ -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$<super_enum::module::SuperFooEnum>"{{.*}}flags: DIFlagProtected{{.*}})
pub fn use_everything() {
black_box(SuperFooEnum::A);