diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2020-10-08 19:22:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-08 19:22:15 +0200 |
| commit | e910a24d449028cbbb90e9e99c5b4e72642abd59 (patch) | |
| tree | 67e1c6ca4240e14c84d29c53269a81ca1ef5fa34 /src/debuginfo | |
| parent | 1cd63dc9b22fa748b9e3b14f0666874e595a4924 (diff) | |
| parent | 0a5968dfd215a61445c30e0e586a387b938faa67 (diff) | |
| download | rust-e910a24d449028cbbb90e9e99c5b4e72642abd59.tar.gz rust-e910a24d449028cbbb90e9e99c5b4e72642abd59.zip | |
Merge pull request #1093 from bjorn3/use_new_module_interface
Use the new cranelift-module interface
Diffstat (limited to 'src/debuginfo')
| -rw-r--r-- | src/debuginfo/emit.rs | 4 | ||||
| -rw-r--r-- | src/debuginfo/mod.rs | 2 | ||||
| -rw-r--r-- | src/debuginfo/unwind.rs | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/debuginfo/emit.rs b/src/debuginfo/emit.rs index 0a887e8cb59..3ad52c2e873 100644 --- a/src/debuginfo/emit.rs +++ b/src/debuginfo/emit.rs @@ -76,7 +76,7 @@ impl WriterRelocate { #[cfg(feature = "jit")] pub(super) fn relocate_for_jit( mut self, - jit_module: &mut cranelift_module::Module<cranelift_simplejit::SimpleJITBackend>, + jit_product: &cranelift_simplejit::SimpleJITProduct, ) -> Vec<u8> { use std::convert::TryInto; @@ -84,7 +84,7 @@ impl WriterRelocate { match reloc.name { super::DebugRelocName::Section(_) => unreachable!(), super::DebugRelocName::Symbol(sym) => { - let addr = jit_module.get_finalized_function( + let addr = jit_product.lookup_func( cranelift_module::FuncId::from_u32(sym.try_into().unwrap()), ); let val = (addr as u64 as i64 + reloc.addend) as u64; diff --git a/src/debuginfo/mod.rs b/src/debuginfo/mod.rs index 9cad668e3f6..f33aa6683a7 100644 --- a/src/debuginfo/mod.rs +++ b/src/debuginfo/mod.rs @@ -336,6 +336,8 @@ impl<'tcx> DebugContext<'tcx> { | ArgumentPurpose::CalleeSaved => continue, ArgumentPurpose::VMContext | ArgumentPurpose::SignatureId + | ArgumentPurpose::CallerTLS + | ArgumentPurpose::CalleeTLS | ArgumentPurpose::StackLimit => unreachable!(), }; let name = format!("{}{}", base_name, i); diff --git a/src/debuginfo/unwind.rs b/src/debuginfo/unwind.rs index fa1a9d44117..f08dfb60769 100644 --- a/src/debuginfo/unwind.rs +++ b/src/debuginfo/unwind.rs @@ -78,7 +78,7 @@ impl<'tcx> UnwindContext<'tcx> { #[cfg(feature = "jit")] pub(crate) unsafe fn register_jit( self, - jit_module: &mut Module<cranelift_simplejit::SimpleJITBackend>, + jit_product: &cranelift_simplejit::SimpleJITProduct, ) -> Option<UnwindRegistry> { let mut eh_frame = EhFrame::from(super::emit::WriterRelocate::new(super::target_endian( self.tcx, @@ -89,7 +89,7 @@ impl<'tcx> UnwindContext<'tcx> { return None; } - let mut eh_frame = eh_frame.0.relocate_for_jit(jit_module); + let mut eh_frame = eh_frame.0.relocate_for_jit(jit_product); // GCC expects a terminating "empty" length, so write a 0 length at the end of the table. eh_frame.extend(&[0, 0, 0, 0]); |
