Skip to content

Commit bfb49e7

Browse files
committed
Rustup to rustc 1.39.0-nightly (6e19f3f38 2019-09-06)
1 parent a2e905f commit bfb49e7

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

src/abi/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub fn get_function_name_and_sig<'tcx>(
103103
unimpl!("Variadic function definitions are not yet supported");
104104
}
105105
let sig = clif_sig_from_fn_sig(tcx, fn_sig, false);
106-
(tcx.symbol_name(inst).as_str().to_string(), sig)
106+
(tcx.symbol_name(inst).name.as_str().to_string(), sig)
107107
}
108108

109109
/// Instance must be monomorphized
@@ -371,10 +371,10 @@ pub fn codegen_terminator_call<'tcx>(
371371
let instance =
372372
ty::Instance::resolve(fx.tcx, ty::ParamEnv::reveal_all(), def_id, substs).unwrap();
373373

374-
if fx.tcx.symbol_name(instance).as_str().starts_with("llvm.") {
374+
if fx.tcx.symbol_name(instance).name.as_str().starts_with("llvm.") {
375375
crate::llvm_intrinsics::codegen_llvm_intrinsic_call(
376376
fx,
377-
&fx.tcx.symbol_name(instance).as_str(),
377+
&fx.tcx.symbol_name(instance).name.as_str(),
378378
substs,
379379
args,
380380
destination,

src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ fn trans_stmt<'tcx>(
570570

571571
crate::trap::trap_unimplemented(fx, "_xgetbv arch intrinsic is not supported");
572572
}
573-
_ if fx.tcx.symbol_name(fx.instance).as_str() == "__rust_probestack" => {
573+
_ if fx.tcx.symbol_name(fx.instance).name.as_str() == "__rust_probestack" => {
574574
crate::trap::trap_unimplemented(fx, "__rust_probestack is not supported");
575575
}
576576
_ => unimpl!("Inline assembly is not supported"),

src/constant.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ fn data_id_for_static(
206206
linkage: Linkage,
207207
) -> DataId {
208208
let instance = Instance::mono(tcx, def_id);
209-
let symbol_name = tcx.symbol_name(instance).as_str();
209+
let symbol_name = tcx.symbol_name(instance).name.as_str();
210210
let ty = instance.ty(tcx);
211211
let is_mutable = if tcx.is_mutable_static(def_id) {
212212
true
@@ -318,19 +318,19 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut Module<impl Backend>, cx: &mu
318318

319319
let mut data_ctx = DataContext::new();
320320

321-
let mut bytes = alloc.bytes.to_vec();
321+
let mut bytes = alloc.inspect_with_undef_and_ptr_outside_interpreter(0..alloc.len()).to_vec();
322322
// The machO backend of faerie doesn't align data objects correctly unless we do this.
323323
while bytes.len() as u64 % 16 != 0 {
324324
bytes.push(0xde);
325325
}
326326
data_ctx.define(bytes.into_boxed_slice());
327327

328-
for &(offset, (_tag, reloc)) in alloc.relocations.iter() {
328+
for &(offset, (_tag, reloc)) in alloc.relocations().iter() {
329329
let addend = {
330330
let endianness = tcx.data_layout.endian;
331331
let offset = offset.bytes() as usize;
332332
let ptr_size = tcx.data_layout.pointer_size;
333-
let bytes = &alloc.bytes[offset..offset + ptr_size.bytes() as usize];
333+
let bytes = &alloc.inspect_with_undef_and_ptr_outside_interpreter(offset..offset + ptr_size.bytes() as usize);
334334
read_target_uint(endianness, bytes).unwrap()
335335
};
336336

src/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ fn trans_mono_item<'clif, 'tcx, B: Backend + 'static>(
322322
match mono_item {
323323
MonoItem::Fn(inst) => {
324324
let _inst_guard =
325-
PrintOnPanic(|| format!("{:?} {}", inst, tcx.symbol_name(inst).as_str()));
325+
PrintOnPanic(|| format!("{:?} {}", inst, tcx.symbol_name(inst).name.as_str()));
326326
debug_assert!(!inst.substs.needs_infer());
327327
let _mir_guard = PrintOnPanic(|| {
328328
match inst.def {

src/pretty_clif.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl CommentWriter {
7676
pub fn new<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> Self {
7777
CommentWriter {
7878
global_comments: vec![
79-
format!("symbol {}", tcx.symbol_name(instance).as_str()),
79+
format!("symbol {}", tcx.symbol_name(instance).name.as_str()),
8080
format!("instance {:?}", instance),
8181
format!(
8282
"sig {:?}",
@@ -205,7 +205,7 @@ pub fn write_clif_file<'tcx>(
205205
) {
206206
use std::io::Write;
207207

208-
let symbol_name = tcx.symbol_name(instance).as_str();
208+
let symbol_name = tcx.symbol_name(instance).name.as_str();
209209
let clif_file_name = format!(
210210
"{}/{}__{}.{}.clif",
211211
concat!(env!("CARGO_MANIFEST_DIR"), "/target/out/clif"),

src/trap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn codegen_print(fx: &mut FunctionCx<'_, '_, impl cranelift_module::Backend>, ms
2626
let msg_id = fx
2727
.module
2828
.declare_data(
29-
&(symbol_name.as_str().to_string() + msg),
29+
&(symbol_name.name.as_str().to_string() + msg),
3030
Linkage::Local,
3131
false,
3232
None,

0 commit comments

Comments
 (0)