diff options
| author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-09 15:53:34 +0000 |
|---|---|---|
| committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-09 15:53:34 +0000 |
| commit | ddcce0bb90f609606812c53ad0bc820913872e9d (patch) | |
| tree | a7bdf9542f277c7a923c67db2a78357c25e939d0 /clang/lib/CodeGen/CGBuiltin.cpp | |
| parent | 01547b3ad2d4d5d6f832ac1b52d697391dcf9a7f (diff) | |
| download | bcm5719-llvm-ddcce0bb90f609606812c53ad0bc820913872e9d.tar.gz bcm5719-llvm-ddcce0bb90f609606812c53ad0bc820913872e9d.zip | |
update calls to objectsize intrinsic to match LLVM r156473
add a test for -fbounds-checking code generation
llvm-svn: 156474
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index bf180f64b38..f995614fd56 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -346,11 +346,12 @@ 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.CreateCall2(F, + return RValue::get(Builder.CreateCall3(F, EmitScalarExpr(E->getArg(0)), - CI)); + CI, Runtime)); } case Builtin::BI__builtin_prefetch: { Value *Locality, *RW, *Address = EmitScalarExpr(E->getArg(0)); |

