diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-06 14:43:37 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-03-12 05:50:11 +0000 |
| commit | f0fa06bb7a0fae8743e0b5b25ccd24e03ec2ef74 (patch) | |
| tree | a29d4656f94dca2102b71a35d3706c1badb5fc51 | |
| parent | fcb890ea0c2d47d2fe6ea45fbb41fd3cb78645c8 (diff) | |
| download | rust-f0fa06bb7a0fae8743e0b5b25ccd24e03ec2ef74.tar.gz rust-f0fa06bb7a0fae8743e0b5b25ccd24e03ec2ef74.zip | |
Swap the order of a piece of code to make follow up diffs simpler
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/consts.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/consts.rs b/compiler/rustc_codegen_llvm/src/consts.rs index fbbc1ecbbca..5d25e6cf03f 100644 --- a/compiler/rustc_codegen_llvm/src/consts.rs +++ b/compiler/rustc_codegen_llvm/src/consts.rs @@ -354,8 +354,6 @@ impl<'ll> CodegenCx<'ll, '_> { }; let alloc = alloc.inner(); - let val_llty = self.val_ty(v); - let instance = Instance::mono(self.tcx, def_id); let ty = instance.ty(self.tcx, ty::ParamEnv::reveal_all()); if !is_mutable { @@ -366,6 +364,8 @@ impl<'ll> CodegenCx<'ll, '_> { let g = self.get_static_inner(def_id, llty); + let val_llty = self.val_ty(v); + let g = if val_llty == llty { g } else { |
