Rustup to rustc 1.39.0-nightly (6e19f3f38 2019-09-06)

This commit is contained in:
bjorn3 2019-09-07 10:51:00 +02:00
parent a2e905f22d
commit bfb49e7d19
6 changed files with 12 additions and 12 deletions

View file

@ -103,7 +103,7 @@ pub fn get_function_name_and_sig<'tcx>(
unimpl!("Variadic function definitions are not yet supported");
}
let sig = clif_sig_from_fn_sig(tcx, fn_sig, false);
(tcx.symbol_name(inst).as_str().to_string(), sig)
(tcx.symbol_name(inst).name.as_str().to_string(), sig)
}
/// Instance must be monomorphized
@ -371,10 +371,10 @@ pub fn codegen_terminator_call<'tcx>(
let instance =
ty::Instance::resolve(fx.tcx, ty::ParamEnv::reveal_all(), def_id, substs).unwrap();
if fx.tcx.symbol_name(instance).as_str().starts_with("llvm.") {
if fx.tcx.symbol_name(instance).name.as_str().starts_with("llvm.") {
crate::llvm_intrinsics::codegen_llvm_intrinsic_call(
fx,
&fx.tcx.symbol_name(instance).as_str(),
&fx.tcx.symbol_name(instance).name.as_str(),
substs,
args,
destination,

View file

@ -570,7 +570,7 @@ fn trans_stmt<'tcx>(
crate::trap::trap_unimplemented(fx, "_xgetbv arch intrinsic is not supported");
}
_ if fx.tcx.symbol_name(fx.instance).as_str() == "__rust_probestack" => {
_ if fx.tcx.symbol_name(fx.instance).name.as_str() == "__rust_probestack" => {
crate::trap::trap_unimplemented(fx, "__rust_probestack is not supported");
}
_ => unimpl!("Inline assembly is not supported"),

View file

@ -206,7 +206,7 @@ fn data_id_for_static(
linkage: Linkage,
) -> DataId {
let instance = Instance::mono(tcx, def_id);
let symbol_name = tcx.symbol_name(instance).as_str();
let symbol_name = tcx.symbol_name(instance).name.as_str();
let ty = instance.ty(tcx);
let is_mutable = if tcx.is_mutable_static(def_id) {
true
@ -318,19 +318,19 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut Module<impl Backend>, cx: &mu
let mut data_ctx = DataContext::new();
let mut bytes = alloc.bytes.to_vec();
let mut bytes = alloc.inspect_with_undef_and_ptr_outside_interpreter(0..alloc.len()).to_vec();
// The machO backend of faerie doesn't align data objects correctly unless we do this.
while bytes.len() as u64 % 16 != 0 {
bytes.push(0xde);
}
data_ctx.define(bytes.into_boxed_slice());
for &(offset, (_tag, reloc)) in alloc.relocations.iter() {
for &(offset, (_tag, reloc)) in alloc.relocations().iter() {
let addend = {
let endianness = tcx.data_layout.endian;
let offset = offset.bytes() as usize;
let ptr_size = tcx.data_layout.pointer_size;
let bytes = &alloc.bytes[offset..offset + ptr_size.bytes() as usize];
let bytes = &alloc.inspect_with_undef_and_ptr_outside_interpreter(offset..offset + ptr_size.bytes() as usize);
read_target_uint(endianness, bytes).unwrap()
};

View file

@ -322,7 +322,7 @@ fn trans_mono_item<'clif, 'tcx, B: Backend + 'static>(
match mono_item {
MonoItem::Fn(inst) => {
let _inst_guard =
PrintOnPanic(|| format!("{:?} {}", inst, tcx.symbol_name(inst).as_str()));
PrintOnPanic(|| format!("{:?} {}", inst, tcx.symbol_name(inst).name.as_str()));
debug_assert!(!inst.substs.needs_infer());
let _mir_guard = PrintOnPanic(|| {
match inst.def {

View file

@ -76,7 +76,7 @@ impl CommentWriter {
pub fn new<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> Self {
CommentWriter {
global_comments: vec![
format!("symbol {}", tcx.symbol_name(instance).as_str()),
format!("symbol {}", tcx.symbol_name(instance).name.as_str()),
format!("instance {:?}", instance),
format!(
"sig {:?}",
@ -205,7 +205,7 @@ pub fn write_clif_file<'tcx>(
) {
use std::io::Write;
let symbol_name = tcx.symbol_name(instance).as_str();
let symbol_name = tcx.symbol_name(instance).name.as_str();
let clif_file_name = format!(
"{}/{}__{}.{}.clif",
concat!(env!("CARGO_MANIFEST_DIR"), "/target/out/clif"),

View file

@ -26,7 +26,7 @@ fn codegen_print(fx: &mut FunctionCx<'_, '_, impl cranelift_module::Backend>, ms
let msg_id = fx
.module
.declare_data(
&(symbol_name.as_str().to_string() + msg),
&(symbol_name.name.as_str().to_string() + msg),
Linkage::Local,
false,
None,