From 5a931acb48bb9a8e1b638c494d3d05b6daa428cb Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sat, 12 Jan 2019 12:37:12 +0100 Subject: [PATCH] Improve global name for anonymous allocations --- src/constant.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constant.rs b/src/constant.rs index a4177552cb3..861526653c0 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -165,7 +165,7 @@ fn trans_const_place<'a, 'tcx: 'a>( fn data_id_for_alloc_id(module: &mut Module, alloc_id: AllocId) -> DataId { module - .declare_data(&alloc_id.0.to_string(), Linkage::Local, false) + .declare_data(&format!("__alloc_{}", alloc_id.0), Linkage::Local, false) .unwrap() }