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 {
579579 }
580580}
581581
582- pub struct ThinBuffer ( * mut llvm:: ThinLTOBuffer ) ;
582+ pub struct ThinBuffer ( & ' static mut llvm:: ThinLTOBuffer ) ;
583583
584584unsafe impl Send for ThinBuffer { }
585585unsafe impl Sync for ThinBuffer { }
@@ -604,7 +604,7 @@ impl ThinBuffer {
604604impl Drop for ThinBuffer {
605605 fn drop ( & mut self ) {
606606 unsafe {
607- llvm:: LLVMRustThinLTOBufferFree ( self . 0 ) ;
607+ llvm:: LLVMRustThinLTOBufferFree ( & mut * ( self . 0 as * mut _ ) ) ;
608608 }
609609 }
610610}
Original file line number Diff line number Diff line change @@ -1571,10 +1571,10 @@ extern "C" {
15711571
15721572 pub fn LLVMRustThinLTOAvailable ( ) -> bool ;
15731573 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 ;
15781578 pub fn LLVMRustCreateThinLTOData (
15791579 Modules : * const ThinLTOModule ,
15801580 NumModules : c_uint ,
You can’t perform that action at this time.
0 commit comments