forked from OSchip/llvm-project
zext ivar offsets if required (GNU runtimes).
llvm-svn: 154175
This commit is contained in:
parent
d12b18f820
commit
a79b469d73
|
@ -2654,7 +2654,10 @@ llvm::Value *CGObjCGNU::EmitIvarOffset(CodeGenFunction &CGF,
|
|||
Offset = new llvm::GlobalVariable(TheModule, IntTy,
|
||||
false, llvm::GlobalValue::LinkOnceAnyLinkage,
|
||||
llvm::Constant::getNullValue(IntTy), name);
|
||||
return CGF.Builder.CreateLoad(Offset);
|
||||
Offset = CGF.Builder.CreateLoad(Offset);
|
||||
if (Offset->getType() != PtrDiffTy)
|
||||
Offset = CGF.Builder.CreateZExtOrBitCast(Offset, PtrDiffTy);
|
||||
return Offset;
|
||||
}
|
||||
uint64_t Offset = ComputeIvarBaseOffset(CGF.CGM, Interface, Ivar);
|
||||
return llvm::ConstantInt::get(PtrDiffTy, Offset, /*isSigned*/true);
|
||||
|
|
Loading…
Reference in New Issue