Add iterators for the ArrayInfo objects of the scop
This patch also changes the implementation of the ArrayInfoMap to a MapVector
which will ensure that iterating over the list of ArrayInfo objects gives
predictable results. The single loop that currently enumerates the ArrayInfo
objects only frees the individual objectes, hence a possibly changing
iteration order does not affect the outcome. The added robustness is for
future users of this interface.
llvm-svn: 236583
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 6f8de70..ca6bcb8 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -1722,7 +1722,7 @@
delete Stmt;
// Free the ScopArrayInfo objects.
- for (auto &ScopArrayInfoPair : ScopArrayInfoMap)
+ for (auto &ScopArrayInfoPair : arrays())
delete ScopArrayInfoPair.second;
// Free the alias groups