Use &raw
in the compiler
Like #130865 did for the standard library, we can use `&raw` in the compiler now that stage0 supports it. Also like the other issue, I did not make any doc or test changes at this time.
This commit is contained in:
parent
58420a065b
commit
4160a54dc5
7 changed files with 13 additions and 13 deletions
|
@ -123,7 +123,7 @@ fn get_llvm_object_symbols(
|
|||
llvm::LLVMRustGetSymbols(
|
||||
buf.as_ptr(),
|
||||
buf.len(),
|
||||
std::ptr::addr_of_mut!(*state) as *mut c_void,
|
||||
(&raw mut *state) as *mut c_void,
|
||||
callback,
|
||||
error_callback,
|
||||
)
|
||||
|
|
|
@ -167,7 +167,7 @@ impl WriteBackendMethods for LlvmCodegenBackend {
|
|||
fn print_pass_timings(&self) {
|
||||
unsafe {
|
||||
let mut size = 0;
|
||||
let cstr = llvm::LLVMRustPrintPassTimings(std::ptr::addr_of_mut!(size));
|
||||
let cstr = llvm::LLVMRustPrintPassTimings(&raw mut size);
|
||||
if cstr.is_null() {
|
||||
println!("failed to get pass timings");
|
||||
} else {
|
||||
|
@ -180,7 +180,7 @@ impl WriteBackendMethods for LlvmCodegenBackend {
|
|||
fn print_statistics(&self) {
|
||||
unsafe {
|
||||
let mut size = 0;
|
||||
let cstr = llvm::LLVMRustPrintStatistics(std::ptr::addr_of_mut!(size));
|
||||
let cstr = llvm::LLVMRustPrintStatistics(&raw mut size);
|
||||
if cstr.is_null() {
|
||||
println!("failed to get pass stats");
|
||||
} else {
|
||||
|
|
|
@ -478,7 +478,7 @@ pub(crate) fn print(req: &PrintRequest, mut out: &mut String, sess: &Session) {
|
|||
&tm,
|
||||
cpu_cstring.as_ptr(),
|
||||
callback,
|
||||
std::ptr::addr_of_mut!(out) as *mut c_void,
|
||||
(&raw mut out) as *mut c_void,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue