[llvm-commits] [llvm] r72368 - /llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
Dan Gohman
gohman at apple.com
Sun May 24 12:02:45 PDT 2009
Author: djg
Date: Sun May 24 14:02:45 2009
New Revision: 72368
URL: http://llvm.org/viewvc/llvm-project?rev=72368&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=72368&r1=72367&r2=72368&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Sun May 24 14:02:45 2009
@@ -351,7 +351,7 @@
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);
}
More information about the llvm-commits
mailing list