Skip to content

Commit faff9a7

Browse files
committed
Auto merge of #1443 - RalfJung:rustup, r=RalfJung
rustup Just quickly get things to work with the TLS changes. Eventually I'll look into properly making use of the new infrastructure, but I don't have time right now.
2 parents a8df047 + 17dd44e commit faff9a7

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5fd2f06e99a985dd896684cb2c9f8c7090eca1ab
1+
d3cba254e464303a6495942f3a831c2bbd7f1768

src/machine.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use rustc_middle::{
2222
},
2323
};
2424
use rustc_span::symbol::{sym, Symbol};
25+
use rustc_span::def_id::DefId;
2526
use rustc_target::abi::{LayoutOf, Size};
2627

2728
use crate::*;
@@ -416,10 +417,18 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
416417
Ok(())
417418
}
418419

420+
fn thread_local_alloc_id(
421+
ecx: &mut InterpCx<'mir, 'tcx, Self>,
422+
def_id: DefId,
423+
) -> InterpResult<'tcx, AllocId> {
424+
ecx.get_or_create_thread_local_alloc_id(def_id)
425+
}
426+
419427
fn adjust_global_const(
420428
ecx: &InterpCx<'mir, 'tcx, Self>,
421429
mut val: mir::interpret::ConstValue<'tcx>,
422430
) -> InterpResult<'tcx, mir::interpret::ConstValue<'tcx>> {
431+
// FIXME: Remove this, do The Right Thing in `thread_local_alloc_id` instead.
423432
ecx.remap_thread_local_alloc_ids(&mut val)?;
424433
Ok(val)
425434
}

0 commit comments

Comments
 (0)