[llvm] r207086 - [LCG] Switch the SCC's parent iterators to be value iterators rather
Chandler Carruth
chandlerc at gmail.com
Thu Apr 24 00:48:18 PDT 2014
Author: chandlerc
Date: Thu Apr 24 02:48:18 2014
New Revision: 207086
URL: http://llvm.org/viewvc/llvm-project?rev=207086&view=rev
Log:
[LCG] Switch the SCC's parent iterators to be value iterators rather
than pointer iterators.
Modified:
llvm/trunk/include/llvm/Analysis/LazyCallGraph.h
llvm/trunk/unittests/Analysis/LazyCallGraphTest.cpp
Modified: llvm/trunk/include/llvm/Analysis/LazyCallGraph.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LazyCallGraph.h?rev=207086&r1=207085&r2=207086&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LazyCallGraph.h (original)
+++ llvm/trunk/include/llvm/Analysis/LazyCallGraph.h Thu Apr 24 02:48:18 2014
@@ -41,6 +41,7 @@
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/iterator.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Function.h"
@@ -228,7 +229,7 @@ public:
public:
typedef SmallVectorImpl<Node *>::const_iterator iterator;
- typedef SmallSetVector<SCC *, 1>::const_iterator parent_iterator;
+ typedef pointee_iterator<SmallSetVector<SCC *, 1>::const_iterator> parent_iterator;
iterator begin() const { return Nodes.begin(); }
iterator end() const { return Nodes.end(); }
Modified: llvm/trunk/unittests/Analysis/LazyCallGraphTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Analysis/LazyCallGraphTest.cpp?rev=207086&r1=207085&r2=207086&view=diff
==============================================================================
--- llvm/trunk/unittests/Analysis/LazyCallGraphTest.cpp (original)
+++ llvm/trunk/unittests/Analysis/LazyCallGraphTest.cpp Thu Apr 24 02:48:18 2014
@@ -329,7 +329,7 @@ TEST(LazyCallGraphTest, InterSCCEdgeRemo
EXPECT_EQ("b", A.begin()->getFunction().getName());
EXPECT_EQ(B.end(), B.begin());
- EXPECT_EQ(&AC, *BC.parent_begin());
+ EXPECT_EQ(&AC, &*BC.parent_begin());
CG.removeEdge(A, lookupFunction(*M, "b"));
More information about the llvm-commits
mailing list