about summary refs log tree commit diff
path: root/src/debuginfo
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-11-27 20:48:53 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2020-11-27 20:48:53 +0100
commitd4048407880212bb820f85d2e06e5fc262cce897 (patch)
tree5925b4bb10cdc79e29f475b04728ba8218fd479a /src/debuginfo
parentb5f6c0032ef4162c7d94e88adccbb586b38f49ea (diff)
downloadrust-d4048407880212bb820f85d2e06e5fc262cce897.tar.gz
rust-d4048407880212bb820f85d2e06e5fc262cce897.zip
Merge commit '5988bbd24aa87732bfa1d111ba00bcdaa22c481a' into sync_cg_clif-2020-11-27
Diffstat (limited to 'src/debuginfo')
-rw-r--r--src/debuginfo/emit.rs7
-rw-r--r--src/debuginfo/unwind.rs4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/debuginfo/emit.rs b/src/debuginfo/emit.rs
index f6f795e4561..c21835b1fc3 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_product: &cranelift_simplejit::SimpleJITProduct,
+        jit_module: &cranelift_simplejit::SimpleJITModule,
     ) -> Vec<u8> {
         use std::convert::TryInto;
 
@@ -84,8 +84,9 @@ impl WriterRelocate {
             match reloc.name {
                 super::DebugRelocName::Section(_) => unreachable!(),
                 super::DebugRelocName::Symbol(sym) => {
-                    let addr = jit_product
-                        .lookup_func(cranelift_module::FuncId::from_u32(sym.try_into().unwrap()));
+                    let addr = jit_module.get_finalized_function(
+                        cranelift_module::FuncId::from_u32(sym.try_into().unwrap()),
+                    );
                     let val = (addr as u64 as i64 + reloc.addend) as u64;
                     self.writer
                         .write_udata_at(reloc.offset as usize, val, reloc.size)
diff --git a/src/debuginfo/unwind.rs b/src/debuginfo/unwind.rs
index 68138404c24..e0f62b64e6b 100644
--- a/src/debuginfo/unwind.rs
+++ b/src/debuginfo/unwind.rs
@@ -80,7 +80,7 @@ impl<'tcx> UnwindContext<'tcx> {
     #[cfg(feature = "jit")]
     pub(crate) unsafe fn register_jit(
         self,
-        jit_product: &cranelift_simplejit::SimpleJITProduct,
+        jit_module: &cranelift_simplejit::SimpleJITModule,
     ) -> Option<UnwindRegistry> {
         let mut eh_frame = EhFrame::from(super::emit::WriterRelocate::new(super::target_endian(
             self.tcx,
@@ -91,7 +91,7 @@ impl<'tcx> UnwindContext<'tcx> {
             return None;
         }
 
-        let mut eh_frame = eh_frame.0.relocate_for_jit(jit_product);
+        let mut eh_frame = eh_frame.0.relocate_for_jit(jit_module);
 
         // GCC expects a terminating "empty" length, so write a 0 length at the end of the table.
         eh_frame.extend(&[0, 0, 0, 0]);