Access ivars with inbounds GEPs, even in -fwrapv. It's unlikely that

this can have any optimization effect, given the opacity of objects pointers,
but you never know.

llvm-svn: 126990
This commit is contained in:
John McCall 2011-03-04 08:25:59 +00:00
parent 6647584951
commit 74186ab391
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ LValue CGObjCRuntime::EmitValueForIvarAtOffset(CodeGen::CodeGenFunction &CGF,
QualType IvarTy = Ivar->getType();
const llvm::Type *LTy = CGF.CGM.getTypes().ConvertTypeForMem(IvarTy);
llvm::Value *V = CGF.Builder.CreateBitCast(BaseValue, I8Ptr);
V = CGF.Builder.CreateGEP(V, Offset, "add.ptr");
V = CGF.Builder.CreateInBoundsGEP(V, Offset, "add.ptr");
V = CGF.Builder.CreateBitCast(V, llvm::PointerType::getUnqual(LTy));
if (!Ivar->isBitField()) {