diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-02-16 14:29:27 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-02-16 14:29:27 +0100 |
| commit | f7c493121d4989895dd9c213ed4e877429229b86 (patch) | |
| tree | 12734604f95b67cea9131fb15e8077d6cc0158f4 /src/librustc_codegen_llvm | |
| parent | b2bf37aec075099a8b58c1a52ebca944f318d530 (diff) | |
| download | rust-f7c493121d4989895dd9c213ed4e877429229b86.tar.gz rust-f7c493121d4989895dd9c213ed4e877429229b86.zip | |
Reuse the `Pointer` type instead of passing reassembling it at many use sites
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/consts.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs index ca9e2c87be2..26d3bd91247 100644 --- a/src/librustc_codegen_llvm/consts.rs +++ b/src/librustc_codegen_llvm/consts.rs @@ -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)) |
