summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Analysis/LazyCallGraph.h3
-rw-r--r--llvm/unittests/Analysis/LazyCallGraphTest.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/include/llvm/Analysis/LazyCallGraph.h b/llvm/include/llvm/Analysis/LazyCallGraph.h
index 039b8d77521..24607b293fb 100644
--- a/llvm/include/llvm/Analysis/LazyCallGraph.h
+++ b/llvm/include/llvm/Analysis/LazyCallGraph.h
@@ -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(); }
diff --git a/llvm/unittests/Analysis/LazyCallGraphTest.cpp b/llvm/unittests/Analysis/LazyCallGraphTest.cpp
index 22a95563fb4..781d98ee503 100644
--- a/llvm/unittests/Analysis/LazyCallGraphTest.cpp
+++ b/llvm/unittests/Analysis/LazyCallGraphTest.cpp
@@ -329,7 +329,7 @@ TEST(LazyCallGraphTest, InterSCCEdgeRemoval) {
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"));
OpenPOWER on IntegriCloud