diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2009-11-10 01:02:17 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2009-11-10 01:02:17 +0000 |
commit | 8154d2e023fe3137363f8bbc9dae2dff7188dccb (patch) | |
tree | 86a9954e792abea91b94475c1c671a7491701f15 /lib/Transforms/Scalar/ABCD.cpp | |
parent | a3e46f6405c5b7c3284325514b8f573e197d9b4a (diff) | |
download | external_llvm-8154d2e023fe3137363f8bbc9dae2dff7188dccb.tar.gz external_llvm-8154d2e023fe3137363f8bbc9dae2dff7188dccb.tar.bz2 external_llvm-8154d2e023fe3137363f8bbc9dae2dff7188dccb.zip |
Fix DenseMap iterator constness.
This patch forbids implicit conversion of DenseMap::const_iterator to
DenseMap::iterator which was possible because DenseMapIterator inherited
(publicly) from DenseMapConstIterator. Conversion the other way around is now
allowed as one may expect.
The template DenseMapConstIterator is removed and the template parameter
IsConst which specifies whether the iterator is constant is added to
DenseMapIterator.
Actually IsConst parameter is not necessary since the constness can be
determined from KeyT but this is not relevant to the fix and can be addressed
later.
Patch by Victor Zverovich!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/ABCD.cpp')
-rw-r--r-- | lib/Transforms/Scalar/ABCD.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/ABCD.cpp b/lib/Transforms/Scalar/ABCD.cpp index 3ceda0cbec..e58fa63604 100644 --- a/lib/Transforms/Scalar/ABCD.cpp +++ b/lib/Transforms/Scalar/ABCD.cpp @@ -1049,7 +1049,7 @@ void ABCD::InequalityGraph::printHeader(raw_ostream &OS, Function &F) const { /// Prints the body of the dot file void ABCD::InequalityGraph::printBody(raw_ostream &OS) const { - DenseMap<Value *, SmallPtrSet<Edge *, 16> >::iterator begin = + DenseMap<Value *, SmallPtrSet<Edge *, 16> >::const_iterator begin = graph.begin(), end = graph.end(); for (; begin != end ; ++begin) { |