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, '_> {
390
390
let val_llty = self . val_ty ( v) ;
391
391
392
392
let g = self . get_static_inner ( def_id, val_llty) ;
393
- let llty = self . val_ty ( g) ;
393
+ let llty = llvm :: LLVMGlobalGetValueType ( g) ;
394
394
395
395
let g = if val_llty == llty {
396
396
g
Original file line number Diff line number Diff line change @@ -974,6 +974,7 @@ extern "C" {
974
974
pub fn LLVMGetAlignment ( Global : & Value ) -> c_uint ;
975
975
pub fn LLVMSetAlignment ( Global : & Value , Bytes : c_uint ) ;
976
976
pub fn LLVMSetDLLStorageClass ( V : & Value , C : DLLStorageClass ) ;
977
+ pub fn LLVMGlobalGetValueType ( Global : & Value ) -> & Type ;
977
978
978
979
// Operations on global variables
979
980
pub fn LLVMIsAGlobalVariable ( GlobalVar : & Value ) -> Option < & Value > ;
You can’t perform that action at this time.
0 commit comments