about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-03-21 10:05:22 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2021-03-21 10:05:22 +0100
commit56fe51cb36eadcd360a7cf119d930c841dc6ea38 (patch)
treeb5581d64608d9c78f7e0bbb0ef49ac02cc78fd55 /src
parent7bd3950831bde1f8d4910e9435cf0c423e1a6772 (diff)
downloadrust-56fe51cb36eadcd360a7cf119d930c841dc6ea38.tar.gz
rust-56fe51cb36eadcd360a7cf119d930c841dc6ea38.zip
Update Cranelift
Diffstat (limited to 'src')
-rw-r--r--src/allocator.rs5
-rw-r--r--src/base.rs3
-rw-r--r--src/driver/jit.rs4
-rw-r--r--src/main_shim.rs9
4 files changed, 11 insertions, 10 deletions
diff --git a/src/allocator.rs b/src/allocator.rs
index efb64233ef2..f60645a9f97 100644
--- a/src/allocator.rs
+++ b/src/allocator.rs
@@ -3,6 +3,7 @@
 
 use crate::prelude::*;
 
+use cranelift_codegen::binemit::{NullStackMapSink, NullTrapSink};
 use rustc_ast::expand::allocator::{AllocatorKind, AllocatorTy, ALLOCATOR_METHODS};
 use rustc_span::symbol::sym;
 
@@ -92,7 +93,7 @@ fn codegen_inner(
             bcx.finalize();
         }
         module
-            .define_function(func_id, &mut ctx, &mut cranelift_codegen::binemit::NullTrapSink {})
+            .define_function(func_id, &mut ctx, &mut NullTrapSink {}, &mut NullStackMapSink {})
             .unwrap();
         unwind_context.add_function(func_id, &ctx, module.isa());
     }
@@ -132,7 +133,7 @@ fn codegen_inner(
         bcx.finalize();
     }
     module
-        .define_function(func_id, &mut ctx, &mut cranelift_codegen::binemit::NullTrapSink {})
+        .define_function(func_id, &mut ctx, &mut NullTrapSink {}, &mut NullStackMapSink {})
         .unwrap();
     unwind_context.add_function(func_id, &ctx, module.isa());
 }
diff --git a/src/base.rs b/src/base.rs
index 33a28ac733e..8c14e04eeeb 100644
--- a/src/base.rs
+++ b/src/base.rs
@@ -1,5 +1,6 @@
 //! Codegen of a single function
 
+use cranelift_codegen::binemit::{NullStackMapSink, NullTrapSink};
 use rustc_index::vec::IndexVec;
 use rustc_middle::ty::adjustment::PointerCast;
 use rustc_middle::ty::layout::FnAbiExt;
@@ -131,7 +132,7 @@ pub(crate) fn codegen_fn<'tcx>(
     let module = &mut cx.module;
     tcx.sess.time("define function", || {
         module
-            .define_function(func_id, context, &mut cranelift_codegen::binemit::NullTrapSink {})
+            .define_function(func_id, context, &mut NullTrapSink {}, &mut NullStackMapSink {})
             .unwrap()
     });
 
diff --git a/src/driver/jit.rs b/src/driver/jit.rs
index dec95d65714..1b08b416913 100644
--- a/src/driver/jit.rs
+++ b/src/driver/jit.rs
@@ -5,6 +5,7 @@ use std::cell::RefCell;
 use std::ffi::CString;
 use std::os::raw::{c_char, c_int};
 
+use cranelift_codegen::binemit::{NullStackMapSink, NullTrapSink};
 use rustc_codegen_ssa::CrateInfo;
 use rustc_middle::mir::mono::MonoItem;
 use rustc_session::config::EntryFnType;
@@ -297,7 +298,8 @@ fn codegen_shim<'tcx>(cx: &mut CodegenCx<'_, 'tcx>, inst: Instance<'tcx>) {
         .define_function(
             func_id,
             &mut Context::for_function(trampoline),
-            &mut cranelift_codegen::binemit::NullTrapSink {},
+            &mut NullTrapSink {},
+            &mut NullStackMapSink {},
         )
         .unwrap();
 }
diff --git a/src/main_shim.rs b/src/main_shim.rs
index 62e551b186f..a6266f50776 100644
--- a/src/main_shim.rs
+++ b/src/main_shim.rs
@@ -1,3 +1,4 @@
+use cranelift_codegen::binemit::{NullStackMapSink, NullTrapSink};
 use rustc_hir::LangItem;
 use rustc_session::config::EntryFnType;
 
@@ -100,12 +101,8 @@ pub(crate) fn maybe_create_entry_wrapper(
             bcx.seal_all_blocks();
             bcx.finalize();
         }
-        m.define_function(
-            cmain_func_id,
-            &mut ctx,
-            &mut cranelift_codegen::binemit::NullTrapSink {},
-        )
-        .unwrap();
+        m.define_function(cmain_func_id, &mut ctx, &mut NullTrapSink {}, &mut NullStackMapSink {})
+            .unwrap();
         unwind_context.add_function(cmain_func_id, &ctx, m.isa());
     }
 }