We have to allow one to form an address for one past the end. WIP.

llvm-svn: 91347
This commit is contained in:
Mike Stump 2009-12-14 22:14:31 +00:00
parent ffbf2de1d8
commit 590d18f103
1 changed files with 1 additions and 1 deletions

View File

@ -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);