Fix this code for hosts where std::vector doesn't have .data().

Use &Ops[0] instead, which is safe since Ops will never be empty here.

llvm-svn: 72368
This commit is contained in:
Dan Gohman 2009-05-24 19:02:45 +00:00
parent fb56cf1b1d
commit 3cdfe749e0
1 changed files with 1 additions and 1 deletions

View File

@ -351,7 +351,7 @@ Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) {
if (SE.TD)
if (const PointerType *PTy = dyn_cast<PointerType>(V->getType())) {
const std::vector<SCEVHandle> &Ops = S->getOperands();
return expandAddToGEP(Ops.data(), Ops.data() + Ops.size() - 1,
return expandAddToGEP(&Ops[0], &Ops[Ops.size() - 1],
PTy, Ty, V);
}