Rollup merge of #79077 - RalfJung:llvm-magic, r=Mark-Simulacrum
document that __rust_alloc is also magic to our LLVM fork Based on [comments](https://github.com/rust-lang/rust/pull/79045#discussion_r523442198) by ````@tmiasko```` and ````@bjorn3.````
This commit is contained in:
commit
70a4e433b1
@ -23,6 +23,8 @@
|
||||
// (the code expanding that attribute macro generates those functions), or to call
|
||||
// the default implementations in libstd (`__rdl_alloc` etc. in `library/std/src/alloc.rs`)
|
||||
// otherwise.
|
||||
// The rustc fork of LLVM also special-cases these function names to be able to optimize them
|
||||
// like `malloc`, `realloc`, and `free`, respectively.
|
||||
#[rustc_allocator]
|
||||
#[rustc_allocator_nounwind]
|
||||
fn __rust_alloc(size: usize, align: usize) -> *mut u8;
|
||||
|
Loading…
Reference in New Issue
Block a user