summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-03-04 08:25:59 +0000
committerJohn McCall <rjmccall@apple.com>2011-03-04 08:25:59 +0000
commit74186ab391c8e82b58efd015ae7fd91c322355ed (patch)
tree6a396da1ff811753574713183ad58dfd412a71f4 /clang
parent6647584951c6ec47248aaed409c82a17e1ce7f3f (diff)
downloadbcm5719-llvm-74186ab391c8e82b58efd015ae7fd91c322355ed.tar.gz
bcm5719-llvm-74186ab391c8e82b58efd015ae7fd91c322355ed.zip
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
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CGObjCMac.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index d2af104e483..bc02ed5b436 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/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()) {
OpenPOWER on IntegriCloud