Skip to content

Commit ce29051

Browse files
wesleywiserdavidtwco
authored andcommitted
Adapt debug-accessibility tests for msvc-style enums
1 parent 07931c5 commit ce29051

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

tests/codegen/debug-accessibility/crate-enum.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// compile-flags: -C debuginfo=2
2+
// ignore-tidy-linelength
23

34
#![allow(dead_code)]
45

@@ -13,7 +14,8 @@ mod module {
1314
C { x: u32 },
1415
}
1516

16-
// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "CrateFooEnum"{{.*}}flags: DIFlagProtected{{.*}})
17+
// NONMSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "CrateFooEnum"{{.*}}flags: DIFlagProtected{{.*}})
18+
// MSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<crate_enum::module::CrateFooEnum>"{{.*}}flags: DIFlagProtected{{.*}})
1719
pub fn use_everything() {
1820
black_box(CrateFooEnum::A);
1921
}

tests/codegen/debug-accessibility/private-enum.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// compile-flags: -C debuginfo=2
2+
// ignore-tidy-linelength
23

34
#![allow(dead_code)]
45

@@ -12,7 +13,8 @@ enum PrivateFooEnum {
1213
C { x: u32 },
1314
}
1415

15-
// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PrivateFooEnum"{{.*}}flags: DIFlagPrivate{{.*}})
16+
// NONMSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PrivateFooEnum"{{.*}}flags: DIFlagPrivate{{.*}})
17+
// MSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<private_enum::PrivateFooEnum>"{{.*}}flags: DIFlagPrivate{{.*}})
1618

1719
fn main() {
1820
black_box(PrivateFooEnum::A);

tests/codegen/debug-accessibility/public-enum.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// compile-flags: -C debuginfo=2
2+
// ignore-tidy-linelength
23

34
#![allow(dead_code)]
45

@@ -12,7 +13,8 @@ pub enum PublicFooEnum {
1213
C { x: u32 },
1314
}
1415

15-
// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PublicFooEnum"{{.*}}flags: DIFlagPublic{{.*}})
16+
// NONMSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PublicFooEnum"{{.*}}flags: DIFlagPublic{{.*}})
17+
// MSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<public_enum::PublicFooEnum>"{{.*}}flags: DIFlagPublic{{.*}})
1618

1719
fn main() {
1820
black_box(PublicFooEnum::A);

tests/codegen/debug-accessibility/super-enum.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// compile-flags: -C debuginfo=2
2+
// ignore-tidy-linelength
23

34
#![allow(dead_code)]
45

@@ -13,7 +14,8 @@ mod module {
1314
C { x: u32 },
1415
}
1516

16-
// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "SuperFooEnum"{{.*}}flags: DIFlagProtected{{.*}})
17+
// NONMSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "SuperFooEnum"{{.*}}flags: DIFlagProtected{{.*}})
18+
// MSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<super_enum::module::SuperFooEnum>"{{.*}}flags: DIFlagProtected{{.*}})
1719

1820
pub fn use_everything() {
1921
black_box(SuperFooEnum::A);

0 commit comments

Comments
 (0)