Skip to content

Commit b09dd05

Browse files
committed
prospective fix for "Global variable initializer type does not match global variable type! ptr @OBJC_MODULES"
1 parent 0778ecf commit b09dd05

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_codegen_llvm/src/consts.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,8 +715,7 @@ impl<'ll> CodegenCx<'ll, '_> {
715715
let size = self.const_uint(i32_llty, 16);
716716
let name = self.define_objc_classname("");
717717
let symtab = self.const_null(ptr_llty);
718-
let packed = false;
719-
let llval = self.const_struct(&[version, size, name, symtab], packed);
718+
let llval = crate::common::named_struct(llty, &[version, size, name, symtab]);
720719

721720
let sym = "OBJC_MODULES";
722721
let g = self.define_global(&sym, llty).unwrap_or_else(|| {

0 commit comments

Comments
 (0)