diff options
author | John McCall <rjmccall@apple.com> | 2011-03-04 08:25:59 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-03-04 08:25:59 +0000 |
commit | fb4eb9f56c1b7bb4fb632127a5e2d253b65758bf (patch) | |
tree | 801f3a39b210566e68dbacbb24b5a96da5ce86d0 /lib | |
parent | 604da292483bc94a6a3e4700cd426d4fa7f1a4a8 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index d2af104e48..bc02ed5b43 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -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()) { |