Skip to content

Commit 9c01301

Browse files
committedSep 5, 2024
Auto merge of #129994 - matthiaskrgr:rollup-zkj4ekl, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #128820 (fix: get llvm type of global val) - #129028 (`impl_trait_overcaptures`: Don't worry about uncaptured contravariant lifetimes if they outlive a captured lifetime) - #129471 ([rustdoc] Sort impl associated items by kinds and then by appearance) - #129706 (Rename dump of coroutine by-move-body to be more consistent, fix ICE in dump_mir) - #129720 (Simplify DestProp memory management) - #129796 (Unify scraped examples with other code examples) - #129938 (Elaborate on deriving vs implementing `Copy`) - #129973 (run_make_support: rename `Command::stdin` to `stdin_buf` and add `std{in,out,err}` config helpers) r? `@ghost` `@rustbot` modify labels: rollup
2 parents eb33b43 + fee6c0a commit 9c01301

File tree

60 files changed

+1074
-450
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1074
-450
lines changed
 

‎compiler/rustc_codegen_llvm/src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ impl<'ll> CodegenCx<'ll, '_> {
390390
let val_llty = self.val_ty(v);
391391

392392
let g = self.get_static_inner(def_id, val_llty);
393-
let llty = self.val_ty(g);
393+
let llty = llvm::LLVMGlobalGetValueType(g);
394394

395395
let g = if val_llty == llty {
396396
g

‎compiler/rustc_codegen_llvm/src/llvm/ffi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,7 @@ unsafe extern "C" {
974974
pub fn LLVMGetAlignment(Global: &Value) -> c_uint;
975975
pub fn LLVMSetAlignment(Global: &Value, Bytes: c_uint);
976976
pub fn LLVMSetDLLStorageClass(V: &Value, C: DLLStorageClass);
977+
pub fn LLVMGlobalGetValueType(Global: &Value) -> &Type;
977978

978979
// Operations on global variables
979980
pub fn LLVMIsAGlobalVariable(GlobalVar: &Value) -> Option<&Value>;

0 commit comments

Comments
 (0)