Sync from rust fda509e817
This commit is contained in:
commit
8d11939589
21
src/base.rs
21
src/base.rs
@ -677,21 +677,22 @@ fn codegen_stmt<'tcx>(
|
||||
CastKind::PointerCoercion(PointerCoercion::UnsafeFnPointer),
|
||||
ref operand,
|
||||
to_ty,
|
||||
)
|
||||
| Rvalue::Cast(
|
||||
CastKind::PointerCoercion(PointerCoercion::MutToConstPointer),
|
||||
ref operand,
|
||||
to_ty,
|
||||
)
|
||||
| Rvalue::Cast(
|
||||
CastKind::PointerCoercion(PointerCoercion::ArrayToPointer),
|
||||
ref operand,
|
||||
to_ty,
|
||||
) => {
|
||||
let to_layout = fx.layout_of(fx.monomorphize(to_ty));
|
||||
let operand = codegen_operand(fx, operand);
|
||||
lval.write_cvalue(fx, operand.cast_pointer_to(to_layout));
|
||||
}
|
||||
Rvalue::Cast(
|
||||
CastKind::PointerCoercion(
|
||||
PointerCoercion::MutToConstPointer | PointerCoercion::ArrayToPointer,
|
||||
),
|
||||
..,
|
||||
) => {
|
||||
bug!(
|
||||
"{:?} is for borrowck, and should never appear in codegen",
|
||||
to_place_and_rval.1
|
||||
);
|
||||
}
|
||||
Rvalue::Cast(
|
||||
CastKind::IntToInt
|
||||
| CastKind::FloatToFloat
|
||||
|
@ -1,6 +1,7 @@
|
||||
use std::sync::{Arc, Condvar, Mutex};
|
||||
|
||||
use jobserver::HelperThread;
|
||||
use rustc_errors::DiagCtxtHandle;
|
||||
use rustc_session::Session;
|
||||
|
||||
// FIXME don't panic when a worker thread panics
|
||||
@ -46,7 +47,7 @@ pub(super) fn new(sess: &Session, pending_jobs: usize) -> Self {
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn acquire(&self, dcx: &rustc_errors::DiagCtxt) -> ConcurrencyLimiterToken {
|
||||
pub(super) fn acquire(&self, dcx: DiagCtxtHandle<'_>) -> ConcurrencyLimiterToken {
|
||||
let mut state = self.state.lock().unwrap();
|
||||
loop {
|
||||
state.assert_invariants();
|
||||
|
@ -276,9 +276,9 @@ fn build_isa(sess: &Session, backend_config: &BackendConfig) -> Arc<dyn TargetIs
|
||||
flags_builder.set("enable_verifier", enable_verifier).unwrap();
|
||||
flags_builder.set("regalloc_checker", enable_verifier).unwrap();
|
||||
|
||||
let preserve_frame_pointer = sess.target.options.frame_pointer
|
||||
!= rustc_target::spec::FramePointer::MayOmit
|
||||
|| matches!(sess.opts.cg.force_frame_pointers, Some(true));
|
||||
let mut frame_ptr = sess.target.options.frame_pointer.clone();
|
||||
frame_ptr.ratchet(sess.opts.cg.force_frame_pointers);
|
||||
let preserve_frame_pointer = frame_ptr != rustc_target::spec::FramePointer::MayOmit;
|
||||
flags_builder
|
||||
.set("preserve_frame_pointers", if preserve_frame_pointer { "true" } else { "false" })
|
||||
.unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user