Skip to content

Commit ac7e836

Browse files
committed
Bless codegen test
1 parent eae5031 commit ac7e836

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

tests/codegen/sanitizer/cfi/emit-type-metadata-id-itanium-cxx-abi-paths.rs

+23-21
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//@ needs-sanitizer-cfi
55
//@ compile-flags: -Clto -Cno-prepopulate-passes -Copt-level=0 -Zsanitizer=cfi -Ctarget-feature=-crt-static
66

7-
#![crate_type="lib"]
7+
#![crate_type = "lib"]
88
#![feature(type_alias_impl_trait)]
99

1010
extern crate core;
@@ -14,14 +14,15 @@ pub type Type2 = impl Send;
1414
pub type Type3 = impl Send;
1515
pub type Type4 = impl Send;
1616

17-
pub fn foo() where
17+
pub fn foo()
18+
where
1819
Type1: 'static,
1920
Type2: 'static,
2021
Type3: 'static,
2122
Type4: 'static,
2223
{
2324
// Type in extern path
24-
extern {
25+
extern "C" {
2526
fn bar();
2627
}
2728
let _: Type1 = bar;
@@ -35,43 +36,44 @@ pub fn foo() where
3536
// Type in const path
3637
const {
3738
pub struct Foo;
38-
fn bar() -> Type3 { Foo }
39+
fn bar() -> Type3 {
40+
Foo
41+
}
3942
};
4043

41-
4244
// Type in impl path
4345
struct Foo;
4446
impl Foo {
45-
fn bar(&self) { }
47+
fn bar(&self) {}
4648
}
4749
let _: Type4 = <Foo>::bar;
4850
}
4951

5052
// Force arguments to be passed by using a reference. Otherwise, they may end up PassMode::Ignore
5153

52-
pub fn foo1(_: &Type1) { }
54+
pub fn foo1(_: &Type1) {}
5355
// CHECK: define{{.*}}4foo1{{.*}}!type ![[TYPE1:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
54-
pub fn foo2(_: &Type1, _: &Type1) { }
56+
pub fn foo2(_: &Type1, _: &Type1) {}
5557
// CHECK: define{{.*}}4foo2{{.*}}!type ![[TYPE2:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
56-
pub fn foo3(_: &Type1, _: &Type1, _: &Type1) { }
58+
pub fn foo3(_: &Type1, _: &Type1, _: &Type1) {}
5759
// CHECK: define{{.*}}4foo3{{.*}}!type ![[TYPE3:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
58-
pub fn foo4(_: &Type2) { }
60+
pub fn foo4(_: &Type2) {}
5961
// CHECK: define{{.*}}4foo4{{.*}}!type ![[TYPE4:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
60-
pub fn foo5(_: &Type2, _: &Type2) { }
62+
pub fn foo5(_: &Type2, _: &Type2) {}
6163
// CHECK: define{{.*}}4foo5{{.*}}!type ![[TYPE5:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
62-
pub fn foo6(_: &Type2, _: &Type2, _: &Type2) { }
64+
pub fn foo6(_: &Type2, _: &Type2, _: &Type2) {}
6365
// CHECK: define{{.*}}4foo6{{.*}}!type ![[TYPE6:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
64-
pub fn foo7(_: &Type3) { }
66+
pub fn foo7(_: &Type3) {}
6567
// CHECK: define{{.*}}4foo7{{.*}}!type ![[TYPE7:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
66-
pub fn foo8(_: &Type3, _: &Type3) { }
68+
pub fn foo8(_: &Type3, _: &Type3) {}
6769
// CHECK: define{{.*}}4foo8{{.*}}!type ![[TYPE8:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
68-
pub fn foo9(_: &Type3, _: &Type3, _: &Type3) { }
70+
pub fn foo9(_: &Type3, _: &Type3, _: &Type3) {}
6971
// CHECK: define{{.*}}4foo9{{.*}}!type ![[TYPE9:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
70-
pub fn foo10(_: &Type4) { }
72+
pub fn foo10(_: &Type4) {}
7173
// CHECK: define{{.*}}5foo10{{.*}}!type ![[TYPE10:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
72-
pub fn foo11(_: &Type4, _: &Type4) { }
74+
pub fn foo11(_: &Type4, _: &Type4) {}
7375
// CHECK: define{{.*}}5foo11{{.*}}!type ![[TYPE11:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
74-
pub fn foo12(_: &Type4, _: &Type4, _: &Type4) { }
76+
pub fn foo12(_: &Type4, _: &Type4, _: &Type4) {}
7577
// CHECK: define{{.*}}5foo12{{.*}}!type ![[TYPE12:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
7678

7779
// CHECK: ![[TYPE1]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NvNFNvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo10{{[{}][{}]}}extern{{[}][}]}}3barEE"}
@@ -80,9 +82,9 @@ pub fn foo12(_: &Type4, _: &Type4, _: &Type4) { }
8082
// CHECK: ![[TYPE4]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NtNCNvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo11{{[{}][{}]}}closure{{[}][}]}}3FooEE"}
8183
// CHECK: ![[TYPE5]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NtNCNvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo11{{[{}][{}]}}closure{{[}][}]}}3FooES0_E"}
8284
// CHECK: ![[TYPE6]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NtNCNvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo11{{[{}][{}]}}closure{{[}][}]}}3FooES0_S0_E"}
83-
// CHECK: ![[TYPE7]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NtNkNvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo12{{[{}][{}]}}constant{{[}][}]}}3FooEE"}
84-
// CHECK: ![[TYPE8]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NtNkNvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo12{{[{}][{}]}}constant{{[}][}]}}3FooES0_E"}
85-
// CHECK: ![[TYPE9]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NtNkNvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo12{{[{}][{}]}}constant{{[}][}]}}3FooES0_S0_E"}
85+
// CHECK: ![[TYPE7]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NtNvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo3FooEE"}
86+
// CHECK: ![[TYPE8]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NtNvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo3FooES0_E"}
87+
// CHECK: ![[TYPE9]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NtNvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo3FooES0_S0_E"}
8688
// CHECK: ![[TYPE10]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NvNINvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo8{{[{}][{}]}}impl{{[}][}]}}3barEE"}
8789
// CHECK: ![[TYPE11]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NvNINvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo8{{[{}][{}]}}impl{{[}][}]}}3barES0_E"}
8890
// CHECK: ![[TYPE12]] = !{i64 0, !"_ZTSFvu3refIu{{[0-9]+}}NvNINvC{{[[:print:]]+}}_{{[[:print:]]+}}3foo8{{[{}][{}]}}impl{{[}][}]}}3barES0_S0_E"}

0 commit comments

Comments
 (0)