about summary refs log tree commit diff
path: root/tests/codegen/debug-accessibility
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codegen/debug-accessibility')
-rw-r--r--tests/codegen/debug-accessibility/crate-enum.rs28
-rw-r--r--tests/codegen/debug-accessibility/crate-struct.rs23
-rw-r--r--tests/codegen/debug-accessibility/private-enum.rs22
-rw-r--r--tests/codegen/debug-accessibility/private-struct.rs17
-rw-r--r--tests/codegen/debug-accessibility/public-enum.rs23
-rw-r--r--tests/codegen/debug-accessibility/public-struct.rs17
-rw-r--r--tests/codegen/debug-accessibility/struct-fields.rs30
-rw-r--r--tests/codegen/debug-accessibility/super-enum.rs28
-rw-r--r--tests/codegen/debug-accessibility/super-struct.rs23
-rw-r--r--tests/codegen/debug-accessibility/tuple-fields.rs24
10 files changed, 0 insertions, 235 deletions
diff --git a/tests/codegen/debug-accessibility/crate-enum.rs b/tests/codegen/debug-accessibility/crate-enum.rs
deleted file mode 100644
index 9ad5a6fd0ff..00000000000
--- a/tests/codegen/debug-accessibility/crate-enum.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// ignore-tidy-linelength
-//! Checks that visibility information is present in the debuginfo for crate-visibility enums.
-
-//@ revisions: MSVC NONMSVC
-//@[MSVC] only-msvc
-//@[NONMSVC] ignore-msvc
-
-//@ compile-flags: -C debuginfo=2
-
-mod module {
-    use std::hint::black_box;
-
-    pub(crate) enum CrateFooEnum {
-        A,
-        B(u32),
-        C { x: u32 },
-    }
-
-    // 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);
-    }
-}
-
-fn main() {
-    module::use_everything();
-}
diff --git a/tests/codegen/debug-accessibility/crate-struct.rs b/tests/codegen/debug-accessibility/crate-struct.rs
deleted file mode 100644
index 73a8ce852ed..00000000000
--- a/tests/codegen/debug-accessibility/crate-struct.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-//@ compile-flags: -C debuginfo=2
-
-#![allow(dead_code)]
-
-// Checks that visibility information is present in the debuginfo for crate-visibility structs.
-
-mod module {
-    use std::hint::black_box;
-
-    pub(crate) struct CrateFooStruct {
-        x: u32,
-    }
-
-    // CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "CrateFooStruct"{{.*}}flags: DIFlagProtected{{.*}})
-
-    pub fn use_everything() {
-        black_box(CrateFooStruct { x: 2 });
-    }
-}
-
-fn main() {
-    module::use_everything();
-}
diff --git a/tests/codegen/debug-accessibility/private-enum.rs b/tests/codegen/debug-accessibility/private-enum.rs
deleted file mode 100644
index 002336c03b3..00000000000
--- a/tests/codegen/debug-accessibility/private-enum.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// ignore-tidy-linelength
-//! Checks that visibility information is present in the debuginfo for private enums.
-
-//@ revisions: MSVC NONMSVC
-//@[MSVC] only-msvc
-//@[NONMSVC] ignore-msvc
-//@ compile-flags: -C debuginfo=2
-
-use std::hint::black_box;
-
-enum PrivateFooEnum {
-    A,
-    B(u32),
-    C { x: u32 },
-}
-
-// 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/private-struct.rs b/tests/codegen/debug-accessibility/private-struct.rs
deleted file mode 100644
index 488a680e81c..00000000000
--- a/tests/codegen/debug-accessibility/private-struct.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-//@ compile-flags: -C debuginfo=2
-
-#![allow(dead_code)]
-
-// Checks that visibility information is present in the debuginfo for private structs.
-
-use std::hint::black_box;
-
-struct PrivateFooStruct {
-    x: u32,
-}
-
-// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PrivateFooStruct"{{.*}}flags: DIFlagPrivate{{.*}})
-
-fn main() {
-    black_box(PrivateFooStruct { x: 1 });
-}
diff --git a/tests/codegen/debug-accessibility/public-enum.rs b/tests/codegen/debug-accessibility/public-enum.rs
deleted file mode 100644
index e5cd1ab7350..00000000000
--- a/tests/codegen/debug-accessibility/public-enum.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// ignore-tidy-linelength
-//! Checks that visibility information is present in the debuginfo for types and their fields.
-
-//@ revisions: MSVC NONMSVC
-//@[MSVC] only-msvc
-//@[NONMSVC] ignore-msvc
-
-//@ compile-flags: -C debuginfo=2
-
-use std::hint::black_box;
-
-pub enum PublicFooEnum {
-    A,
-    B(u32),
-    C { x: u32 },
-}
-
-// 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/public-struct.rs b/tests/codegen/debug-accessibility/public-struct.rs
deleted file mode 100644
index 8b2a53f993c..00000000000
--- a/tests/codegen/debug-accessibility/public-struct.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-//@ compile-flags: -C debuginfo=2
-
-#![allow(dead_code)]
-
-// Checks that visibility information is present in the debuginfo for public structs.
-
-use std::hint::black_box;
-
-pub struct PublicFooStruct {
-    x: u32,
-}
-
-// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PublicFooStruct"{{.*}}flags: DIFlagPublic{{.*}})
-
-fn main() {
-    black_box(PublicFooStruct { x: 4 });
-}
diff --git a/tests/codegen/debug-accessibility/struct-fields.rs b/tests/codegen/debug-accessibility/struct-fields.rs
deleted file mode 100644
index f68bb3438be..00000000000
--- a/tests/codegen/debug-accessibility/struct-fields.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-//@ compile-flags: -C debuginfo=2
-
-#![allow(dead_code)]
-
-// Checks that visibility information is present in the debuginfo for struct fields.
-
-mod module {
-    use std::hint::black_box;
-
-    struct StructFields {
-        a: u32,
-        pub(crate) b: u32,
-        pub(super) c: u32,
-        pub d: u32,
-    }
-
-    // CHECK: [[StructFields:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "StructFields"{{.*}}flags: DIFlagPrivate{{.*}})
-    // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: [[StructFields]]{{.*}}flags: DIFlagPrivate{{.*}})
-    // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: [[StructFields]]{{.*}}flags: DIFlagProtected{{.*}})
-    // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: [[StructFields]]{{.*}}flags: DIFlagProtected{{.*}})
-    // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "d", scope: [[StructFields]]{{.*}}flags: DIFlagPublic{{.*}})
-
-    pub fn use_everything() {
-        black_box(StructFields { a: 1, b: 2, c: 3, d: 4 });
-    }
-}
-
-fn main() {
-    module::use_everything();
-}
diff --git a/tests/codegen/debug-accessibility/super-enum.rs b/tests/codegen/debug-accessibility/super-enum.rs
deleted file mode 100644
index 8e34d8be01f..00000000000
--- a/tests/codegen/debug-accessibility/super-enum.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// ignore-tidy-linelength
-//! Checks that visibility information is present in the debuginfo for super-visibility enums.
-
-//@ revisions: MSVC NONMSVC
-//@[MSVC] only-msvc
-//@[NONMSVC] ignore-msvc
-//@ compile-flags: -C debuginfo=2
-
-mod module {
-    use std::hint::black_box;
-
-    pub(super) enum SuperFooEnum {
-        A,
-        B(u32),
-        C { x: u32 },
-    }
-
-    // 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);
-    }
-}
-
-fn main() {
-    module::use_everything();
-}
diff --git a/tests/codegen/debug-accessibility/super-struct.rs b/tests/codegen/debug-accessibility/super-struct.rs
deleted file mode 100644
index 63954bfb203..00000000000
--- a/tests/codegen/debug-accessibility/super-struct.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-//@ compile-flags: -C debuginfo=2
-
-#![allow(dead_code)]
-
-// Checks that visibility information is present in the debuginfo for super-visibility structs.
-
-mod module {
-    use std::hint::black_box;
-
-    pub(super) struct SuperFooStruct {
-        x: u32,
-    }
-
-    // CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "SuperFooStruct"{{.*}}flags: DIFlagProtected{{.*}})
-
-    pub fn use_everything() {
-        black_box(SuperFooStruct { x: 3 });
-    }
-}
-
-fn main() {
-    module::use_everything();
-}
diff --git a/tests/codegen/debug-accessibility/tuple-fields.rs b/tests/codegen/debug-accessibility/tuple-fields.rs
deleted file mode 100644
index feec6e9eb41..00000000000
--- a/tests/codegen/debug-accessibility/tuple-fields.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-//@ compile-flags: -C debuginfo=2
-
-#![allow(dead_code)]
-
-// Checks that visibility information is present in the debuginfo for tuple struct fields.
-
-mod module {
-    use std::hint::black_box;
-
-    struct TupleFields(u32, pub(crate) u32, pub(super) u32, pub u32);
-
-    // CHECK: [[TupleFields:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "TupleFields"{{.*}}flags: DIFlagPrivate{{.*}})
-    // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "__0", scope: [[TupleFields]]{{.*}}flags: DIFlagPrivate{{.*}})
-    // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "__1", scope: [[TupleFields]]{{.*}}flags: DIFlagProtected{{.*}})
-    // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "__2", scope: [[TupleFields]]{{.*}}flags: DIFlagProtected{{.*}})
-    // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "__3", scope: [[TupleFields]]{{.*}}flags: DIFlagPublic{{.*}})
-    pub fn use_everything() {
-        black_box(TupleFields(1, 2, 3, 4));
-    }
-}
-
-fn main() {
-    module::use_everything();
-}