File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/librustc_codegen_llvm Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -579,7 +579,7 @@ impl Drop for ThinData {
579
579
}
580
580
}
581
581
582
- pub struct ThinBuffer ( * mut llvm:: ThinLTOBuffer ) ;
582
+ pub struct ThinBuffer ( & ' static mut llvm:: ThinLTOBuffer ) ;
583
583
584
584
unsafe impl Send for ThinBuffer { }
585
585
unsafe impl Sync for ThinBuffer { }
@@ -604,7 +604,7 @@ impl ThinBuffer {
604
604
impl Drop for ThinBuffer {
605
605
fn drop ( & mut self ) {
606
606
unsafe {
607
- llvm:: LLVMRustThinLTOBufferFree ( self . 0 ) ;
607
+ llvm:: LLVMRustThinLTOBufferFree ( & mut * ( self . 0 as * mut _ ) ) ;
608
608
}
609
609
}
610
610
}
Original file line number Diff line number Diff line change @@ -1571,10 +1571,10 @@ extern "C" {
1571
1571
1572
1572
pub fn LLVMRustThinLTOAvailable ( ) -> bool ;
1573
1573
pub fn LLVMRustPGOAvailable ( ) -> bool ;
1574
- pub fn LLVMRustThinLTOBufferCreate ( M : & Module ) -> * mut ThinLTOBuffer ;
1575
- pub fn LLVMRustThinLTOBufferFree ( M : * mut ThinLTOBuffer ) ;
1576
- pub fn LLVMRustThinLTOBufferPtr ( M : * const ThinLTOBuffer ) -> * const c_char ;
1577
- pub fn LLVMRustThinLTOBufferLen ( M : * const ThinLTOBuffer ) -> size_t ;
1574
+ pub fn LLVMRustThinLTOBufferCreate ( M : & Module ) -> & ' static mut ThinLTOBuffer ;
1575
+ pub fn LLVMRustThinLTOBufferFree ( M : & ' static mut ThinLTOBuffer ) ;
1576
+ pub fn LLVMRustThinLTOBufferPtr ( M : & ThinLTOBuffer ) -> * const c_char ;
1577
+ pub fn LLVMRustThinLTOBufferLen ( M : & ThinLTOBuffer ) -> size_t ;
1578
1578
pub fn LLVMRustCreateThinLTOData (
1579
1579
Modules : * const ThinLTOModule ,
1580
1580
NumModules : c_uint ,
You can’t perform that action at this time.
0 commit comments