1
Fork 0

[eddyb] rustc_codegen_ssa: handle LLVM unsafety correctly.

This commit is contained in:
Eduard-Mihai Burtescu 2018-11-16 13:33:28 +02:00
parent bf7f8cd3fc
commit 9bb6663431
7 changed files with 29 additions and 22 deletions

View file

@ -194,7 +194,9 @@ pub fn compile_codegen_unit<'ll, 'tcx>(tcx: TyCtxt<'ll, 'tcx, 'tcx>,
// Run replace-all-uses-with for statics that need it
for &(old_g, new_g) in cx.statics_to_rauw().borrow().iter() {
cx.static_replace_all_uses(old_g, new_g)
unsafe {
cx.static_replace_all_uses(old_g, new_g)
}
}
// Create the llvm.used variable