Skip to content

Commit 60fa7b3

Browse files
committed
rename rustc_allocator_nounwind to rustc_nounwind
1 parent 84cdee7 commit 60fa7b3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

alloc/src/alloc.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,20 @@ extern "Rust" {
2828
// The rustc fork of LLVM 14 and earlier also special-cases these function names to be able to optimize them
2929
// like `malloc`, `realloc`, and `free`, respectively.
3030
#[rustc_allocator]
31-
#[rustc_allocator_nounwind]
31+
#[cfg_attr(not(bootstrap), rustc_nounwind)]
32+
#[cfg_attr(bootstrap, rustc_allocator_nounwind)]
3233
fn __rust_alloc(size: usize, align: usize) -> *mut u8;
3334
#[rustc_deallocator]
34-
#[rustc_allocator_nounwind]
35+
#[cfg_attr(not(bootstrap), rustc_nounwind)]
36+
#[cfg_attr(bootstrap, rustc_allocator_nounwind)]
3537
fn __rust_dealloc(ptr: *mut u8, size: usize, align: usize);
3638
#[rustc_reallocator]
37-
#[rustc_allocator_nounwind]
39+
#[cfg_attr(not(bootstrap), rustc_nounwind)]
40+
#[cfg_attr(bootstrap, rustc_allocator_nounwind)]
3841
fn __rust_realloc(ptr: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8;
3942
#[rustc_allocator_zeroed]
40-
#[rustc_allocator_nounwind]
43+
#[cfg_attr(not(bootstrap), rustc_nounwind)]
44+
#[cfg_attr(bootstrap, rustc_allocator_nounwind)]
4145
fn __rust_alloc_zeroed(size: usize, align: usize) -> *mut u8;
4246
}
4347

0 commit comments

Comments
 (0)