File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
compiler/rustc_codegen_llvm/src Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 > ;
You can’t perform that action at this time.
0 commit comments