diff options
author | Mike Stump <mrs@apple.com> | 2009-12-14 22:14:31 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-12-14 22:14:31 +0000 |
commit | 590d18f10315cb75b00eb10d8f6bebecb382336d (patch) | |
tree | 032a7531f8dc9b6ef030ee40c465657ce12c3595 /clang/lib/CodeGen | |
parent | ffbf2de1d8485be3090b9c4dbe358c82f47c9eb1 (diff) | |
download | bcm5719-llvm-590d18f10315cb75b00eb10d8f6bebecb382336d.tar.gz bcm5719-llvm-590d18f10315cb75b00eb10d8f6bebecb382336d.zip |
We have to allow one to form an address for one past the end. WIP.
llvm-svn: 91347
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 47d2ee96d85..b9334d0a84b 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1078,7 +1078,7 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E) { = getContext().getAsConstantArrayType(DRE->getType())) { llvm::APInt Size = CAT->getSize(); llvm::BasicBlock *Cont = createBasicBlock("cont"); - Builder.CreateCondBr(Builder.CreateICmpULT(Idx, + Builder.CreateCondBr(Builder.CreateICmpULE(Idx, llvm::ConstantInt::get(Idx->getType(), Size)), Cont, getAbortBB()); EmitBlock(Cont); |