forked from OSchip/llvm-project
We have to allow one to form an address for one past the end. WIP.
llvm-svn: 91347
This commit is contained in:
parent
ffbf2de1d8
commit
590d18f103
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue