From fb5a3419f351056e0f599699d276bcab412d2cce Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sun, 24 May 2009 19:02:45 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72368 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ScalarEvolutionExpander.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp index 7ebc00a19ae..03406271ded 100644 --- a/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/lib/Analysis/ScalarEvolutionExpander.cpp @@ -351,7 +351,7 @@ Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) { if (SE.TD) if (const PointerType *PTy = dyn_cast(V->getType())) { const std::vector &Ops = S->getOperands(); - return expandAddToGEP(Ops.data(), Ops.data() + Ops.size() - 1, + return expandAddToGEP(&Ops[0], &Ops[Ops.size() - 1], PTy, Ty, V); } -- 2.34.1