Skip to content

Commit bfb78ea

Browse files
committed
test: update to the new mangling scheme.
1 parent 386d425 commit bfb78ea

File tree

16 files changed

+87
-40
lines changed

16 files changed

+87
-40
lines changed

Cargo.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,15 +2366,15 @@ dependencies = [
23662366
name = "rustc-demangle"
23672367
version = "0.1.10"
23682368
source = "registry+https://github.com/rust-lang/crates.io-index"
2369-
dependencies = [
2370-
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
2371-
"rustc-std-workspace-core 1.0.0",
2372-
]
23732369

23742370
[[package]]
23752371
name = "rustc-demangle"
23762372
version = "0.1.13"
23772373
source = "git+https://github.com/eddyb/rustc-demangle?rev=20d5bcc9bcea0d9413540916dd5f9fdadc7012f7#20d5bcc9bcea0d9413540916dd5f9fdadc7012f7"
2374+
dependencies = [
2375+
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
2376+
"rustc-std-workspace-core 1.0.0",
2377+
]
23782378

23792379
[[package]]
23802380
name = "rustc-hash"
@@ -2497,7 +2497,7 @@ dependencies = [
24972497
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
24982498
"memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
24992499
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
2500-
"rustc-demangle 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
2500+
"rustc-demangle 0.1.13 (git+https://github.com/eddyb/rustc-demangle?rev=20d5bcc9bcea0d9413540916dd5f9fdadc7012f7)",
25012501
"rustc_llvm 0.0.0",
25022502
]
25032503

@@ -2513,7 +2513,7 @@ dependencies = [
25132513
"memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
25142514
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
25152515
"rustc 0.0.0",
2516-
"rustc-demangle 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
2516+
"rustc-demangle 0.1.13 (git+https://github.com/eddyb/rustc-demangle?rev=20d5bcc9bcea0d9413540916dd5f9fdadc7012f7)",
25172517
"rustc_allocator 0.0.0",
25182518
"rustc_apfloat 0.0.0",
25192519
"rustc_codegen_utils 0.0.0",
@@ -3094,7 +3094,7 @@ dependencies = [
30943094
"panic_unwind 0.0.0",
30953095
"profiler_builtins 0.0.0",
30963096
"rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
3097-
"rustc-demangle 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
3097+
"rustc-demangle 0.1.13 (git+https://github.com/eddyb/rustc-demangle?rev=20d5bcc9bcea0d9413540916dd5f9fdadc7012f7)",
30983098
"rustc_asan 0.0.0",
30993099
"rustc_lsan 0.0.0",
31003100
"rustc_msan 0.0.0",

src/librustc_codegen_llvm/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@ test = false
1212
[dependencies]
1313
cc = "1.0.1"
1414
num_cpus = "1.0"
15-
rustc-demangle = "0.1.4"
15+
# rustc-demangle = "0.1.4"
1616
rustc_llvm = { path = "../librustc_llvm" }
1717
memmap = "0.6"
1818

19+
# HACK(eddyb) temporary until upstreaming support for the new mangling scheme
20+
[dependencies.rustc-demangle]
21+
git = "https://github.com/eddyb/rustc-demangle"
22+
rev = "20d5bcc9bcea0d9413540916dd5f9fdadc7012f7"
23+
1924
[features]
2025
# This is used to convince Cargo to separately cache builds of `rustc_codegen_llvm`
2126
# when this option is enabled or not. That way we can build two, cache two

src/librustc_codegen_ssa/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test = false
1313
bitflags = "1.0.4"
1414
cc = "1.0.1"
1515
num_cpus = "1.0"
16-
rustc-demangle = "0.1.4"
16+
# rustc-demangle = "0.1.4"
1717
memmap = "0.6"
1818
log = "0.4.5"
1919
libc = "0.2.44"
@@ -32,3 +32,8 @@ rustc_fs_util = { path = "../librustc_fs_util" }
3232
rustc_incremental = { path = "../librustc_incremental" }
3333
rustc_mir = { path = "../librustc_mir" }
3434
rustc_target = { path = "../librustc_target" }
35+
36+
# HACK(eddyb) temporary until upstreaming support for the new mangling scheme
37+
[dependencies.rustc-demangle]
38+
git = "https://github.com/eddyb/rustc-demangle"
39+
rev = "20d5bcc9bcea0d9413540916dd5f9fdadc7012f7"

src/libstd/Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@ libc = { version = "0.2.44", default-features = false, features = ['rustc-dep-of
2121
compiler_builtins = { version = "0.1.1" }
2222
profiler_builtins = { path = "../libprofiler_builtins", optional = true }
2323
unwind = { path = "../libunwind" }
24-
rustc-demangle = { version = "0.1.10", features = ['rustc-dep-of-std'] }
24+
# rustc-demangle = { version = "0.1.10", features = ['rustc-dep-of-std'] }
2525
backtrace-sys = { version = "0.1.24", features = ["rustc-dep-of-std"], optional = true }
2626

27+
# HACK(eddyb) temporary until upstreaming support for the new mangling scheme
28+
[dependencies.rustc-demangle]
29+
git = "https://github.com/eddyb/rustc-demangle"
30+
rev = "20d5bcc9bcea0d9413540916dd5f9fdadc7012f7"
31+
features = ['rustc-dep-of-std']
32+
2733
[dev-dependencies]
2834
rand = "0.6.1"
2935

src/test/codegen/drop.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ pub fn droppy() {
1919
// that's one new drop call per call to possibly_unwinding(), and finally 3 drop calls for the
2020
// regular function exit. We used to have problems with quadratic growths of drop calls in such
2121
// functions.
22-
// CHECK-NOT: invoke{{.*}}drop{{.*}}SomeUniqueName
23-
// CHECK: call{{.*}}drop{{.*}}SomeUniqueName
24-
// CHECK: call{{.*}}drop{{.*}}SomeUniqueName
25-
// CHECK-NOT: call{{.*}}drop{{.*}}SomeUniqueName
26-
// CHECK: invoke{{.*}}drop{{.*}}SomeUniqueName
27-
// CHECK: call{{.*}}drop{{.*}}SomeUniqueName
28-
// CHECK: invoke{{.*}}drop{{.*}}SomeUniqueName
29-
// CHECK: call{{.*}}drop{{.*}}SomeUniqueName
30-
// CHECK-NOT: {{(call|invoke).*}}drop{{.*}}SomeUniqueName
22+
// CHECK-NOT: ; invoke{{.*}}drop{{.*}}SomeUniqueName
23+
// CHECK: ; call{{.*}}drop{{.*}}SomeUniqueName
24+
// CHECK: ; call{{.*}}drop{{.*}}SomeUniqueName
25+
// CHECK-NOT: ; call{{.*}}drop{{.*}}SomeUniqueName
26+
// CHECK: ; invoke{{.*}}drop{{.*}}SomeUniqueName
27+
// CHECK: ; call{{.*}}drop{{.*}}SomeUniqueName
28+
// CHECK: ; invoke{{.*}}drop{{.*}}SomeUniqueName
29+
// CHECK: ; call{{.*}}drop{{.*}}SomeUniqueName
30+
// CHECK-NOT: ; {{(call|invoke).*}}drop{{.*}}SomeUniqueName
3131
// The next line checks for the } that ends the function definition
3232
// CHECK-LABEL: {{^[}]}}
3333
let _s = SomeUniqueName;

src/test/codegen/external-no-mangle-fns.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ const HIDDEN: () = {
3333
};
3434

3535
// The surrounding item should not accidentally become external
36-
// CHECK: define internal{{.*}} void @_ZN22external_no_mangle_fns1x
36+
// CHECK-LABEL: ; external_no_mangle_fns::x
37+
// CHECK-NEXT: ; Function Attrs:
38+
// CHECK-NEXT: define internal
3739
#[inline(never)]
3840
fn x() {
3941
// CHECK: define void @g()

src/test/codegen/external-no-mangle-statics.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,6 @@ fn x() {
7575
#[no_mangle]
7676
pub static mut P: u8 = 0;
7777
}
78-
// CHECK: define internal void @_ZN26external_no_mangle_statics1x{{.*$}}
78+
// CHECK-LABEL: ; external_no_mangle_statics::x
79+
// CHECK-NEXT: ; Function Attrs:
80+
// CHECK-NEXT: define internal

src/test/codegen/internalize-closures.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ pub fn main() {
44

55
// We want to make sure that closures get 'internal' linkage instead of
66
// 'weak_odr' when they are not shared between codegen units
7-
// CHECK: define internal {{.*}}_ZN20internalize_closures4main{{.*}}$u7b$$u7b$closure$u7d$$u7d$
7+
// CHECK-LABEL: ; internalize_closures::main::{closure#0}
8+
// CHECK-NEXT: ; Function Attrs:
9+
// CHECK-NEXT: define internal
810
let c = |x:i32| { x + 1 };
911
let _ = c(1);
1012
}

src/test/codegen/link-dead-code.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@
55
// This test makes sure that, when -Clink-dead-code is specified, we generate
66
// code for functions that would otherwise be skipped.
77

8-
// CHECK-LABEL: define hidden i32 @_ZN14link_dead_code8const_fn
8+
// CHECK-LABEL: ; link_dead_code::const_fn
9+
// CHECK-NEXT: ; Function Attrs:
10+
// CHECK-NEXT: define hidden
911
const fn const_fn() -> i32 { 1 }
1012

11-
// CHECK-LABEL: define hidden i32 @_ZN14link_dead_code9inline_fn
13+
// CHECK-LABEL: ; link_dead_code::inline_fn
14+
// CHECK-NEXT: ; Function Attrs:
15+
// CHECK-NEXT: define hidden
1216
#[inline]
1317
fn inline_fn() -> i32 { 2 }
1418

15-
// CHECK-LABEL: define hidden i32 @_ZN14link_dead_code10private_fn
19+
// CHECK-LABEL: ; link_dead_code::private_fn
20+
// CHECK-NEXT: ; Function Attrs:
21+
// CHECK-NEXT: define hidden
1622
fn private_fn() -> i32 { 3 }

src/test/codegen/local-generics-in-exe-internalized.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
// Check that local generics are internalized if they are in the same CGU
44

5-
// CHECK: define internal {{.*}} @_ZN34local_generics_in_exe_internalized3foo{{.*}}
5+
// CHECK-LABEL: ; local_generics_in_exe_internalized::foo::<u8>
6+
// CHECK-NEXT: ; Function Attrs:
7+
// CHECK-NEXT: define internal
68
pub fn foo<T>(x: T, y: T) -> (T, T) {
79
(x, y)
810
}

0 commit comments

Comments
 (0)