Reuse the Pointer type instead of passing reassembling it at many use sites
This commit is contained in:
parent
b2bf37aec0
commit
f7c493121d
11 changed files with 20 additions and 23 deletions
|
|
@ -71,7 +71,7 @@ pub fn codegen_static_initializer(
|
|||
let static_ = cx.tcx.const_eval(param_env.and(cid))?;
|
||||
|
||||
let alloc = match static_.val {
|
||||
ConstValue::ByRef(_, alloc, n) if n.bytes() == 0 => alloc,
|
||||
ConstValue::ByRef(ptr, alloc) if ptr.offset.bytes() == 0 => alloc,
|
||||
_ => bug!("static const eval returned {:#?}", static_),
|
||||
};
|
||||
Ok((const_alloc_to_llvm(cx, alloc), alloc))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue