aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-05-22 15:26:48 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-05-22 15:26:48 +0000
commit3e86a0433db4c664d29f2b19eb977138e071a68a (patch)
tree2e4f7cab96a4e154ef835309081a693e4ddd83f6 /lib/CodeGen
parentd95e95ec5300249f5b7c6f1b72bde59e5141069c (diff)
revert the usage of the objectsize intrinsic with 3 parameters (to match LLVM r157255)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGBuiltin.cpp5
-rw-r--r--lib/CodeGen/CGExpr.cpp3
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
index 792893f54e..944fbe9f19 100644
--- a/lib/CodeGen/CGBuiltin.cpp
+++ b/lib/CodeGen/CGBuiltin.cpp
@@ -346,12 +346,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
assert(CI);
uint64_t val = CI->getZExtValue();
CI = ConstantInt::get(Builder.getInt1Ty(), (val & 0x2) >> 1);
- Value *Runtime = Builder.getInt32(0); // FIXME: use BoundsChecking here?
Value *F = CGM.getIntrinsic(Intrinsic::objectsize, ResType);
- return RValue::get(Builder.CreateCall3(F,
- EmitScalarExpr(E->getArg(0)),
- CI, Runtime));
+ return RValue::get(Builder.CreateCall2(F, EmitScalarExpr(E->getArg(0)),CI));
}
case Builtin::BI__builtin_prefetch: {
Value *Locality, *RW, *Address = EmitScalarExpr(E->getArg(0));
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index d4e4c402b7..11b8ed254c 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -526,8 +526,7 @@ void CodeGenFunction::EmitCheck(llvm::Value *Address, unsigned Size) {
llvm::Value *F = CGM.getIntrinsic(llvm::Intrinsic::objectsize, IntPtrTy);
llvm::Value *Min = Builder.getFalse();
- llvm::Value *Runtime = Builder.getInt32(BoundsChecking);
- llvm::Value *C = Builder.CreateCall3(F, Address, Min, Runtime);
+ llvm::Value *C = Builder.CreateCall2(F, Address, Min);
llvm::BasicBlock *Cont = createBasicBlock();
Builder.CreateCondBr(Builder.CreateICmpUGE(C,
llvm::ConstantInt::get(IntPtrTy, Size)),