about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWesley Wiser <wesleywiser@microsoft.com>2023-12-13 11:46:28 -0600
committerDavid Wood <david.wood@huawei.com>2023-12-15 11:45:03 +0000
commitce290514df95113a51346b0bd046c0436b9cc92b (patch)
tree88bc4affcad811c24caff3cf7995a6cad047c6bb
parent07931c5a08d4836e127b63762fe310982172e9fa (diff)
downloadrust-ce290514df95113a51346b0bd046c0436b9cc92b.tar.gz
rust-ce290514df95113a51346b0bd046c0436b9cc92b.zip
Adapt debug-accessibility tests for msvc-style enums
-rw-r--r--tests/codegen/debug-accessibility/crate-enum.rs4
-rw-r--r--tests/codegen/debug-accessibility/private-enum.rs4
-rw-r--r--tests/codegen/debug-accessibility/public-enum.rs4
-rw-r--r--tests/codegen/debug-accessibility/super-enum.rs4
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$<crate_enum::module::CrateFooEnum>"{{.*}}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$<private_enum::PrivateFooEnum>"{{.*}}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$<public_enum::PublicFooEnum>"{{.*}}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$<super_enum::module::SuperFooEnum>"{{.*}}flags: DIFlagProtected{{.*}})
 
     pub fn use_everything() {
         black_box(SuperFooEnum::A);