File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -683,7 +683,7 @@ pub(crate) unsafe fn llvm_optimize(
683683 // Here we map the old arguments to the new arguments, with an offset of 1 to make sure
684684 // that we don't use the newly added `%dyn_ptr`.
685685 unsafe {
686- llvm:: LLVMRustOffloadMapper ( cx . llmod ( ) , old_fn, new_fn) ;
686+ llvm:: LLVMRustOffloadMapper ( old_fn, new_fn) ;
687687 }
688688
689689 llvm:: set_linkage ( new_fn, llvm:: get_linkage ( old_fn) ) ;
Original file line number Diff line number Diff line change @@ -2025,7 +2025,7 @@ unsafe extern "C" {
20252025 ) -> & Attribute ;
20262026
20272027 // Operations on functions
2028- pub ( crate ) fn LLVMRustOffloadMapper < ' a > ( M : & ' a Module , Fn : & ' a Value , Fn : & ' a Value ) ;
2028+ pub ( crate ) fn LLVMRustOffloadMapper < ' a > ( Fn : & ' a Value , Fn : & ' a Value ) ;
20292029 pub ( crate ) fn LLVMRustGetOrInsertFunction < ' a > (
20302030 M : & ' a Module ,
20312031 Name : * const c_char ,
Original file line number Diff line number Diff line change @@ -144,9 +144,7 @@ extern "C" void LLVMRustPrintStatistics(RustStringRef OutBuf) {
144144 llvm::PrintStatistics (OS);
145145}
146146
147- extern " C" void LLVMRustOffloadMapper (LLVMModuleRef M, LLVMValueRef OldFn,
148- LLVMValueRef NewFn) {
149- llvm::Module *module = llvm::unwrap (M);
147+ extern " C" void LLVMRustOffloadMapper (LLVMValueRef OldFn, LLVMValueRef NewFn) {
150148 llvm::Function *oldFn = llvm::unwrap<llvm::Function>(OldFn);
151149 llvm::Function *newFn = llvm::unwrap<llvm::Function>(NewFn);
152150
You can’t perform that action at this time.
0 commit comments