1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

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 ccdd18130a
commit 942daf73f8

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