summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LazyCallGraph.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-02-06 05:17:02 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-02-06 05:17:02 +0000
commitd1ba2efb8f2523bda0face1954d5388b7c88a9fc (patch)
tree04a81f00ab2feb049d05b903b8f1d38ed4b8f641 /llvm/lib/Analysis/LazyCallGraph.cpp
parentd230a3d1f6df21caa8f48b4548c27e0f7a4dfbd1 (diff)
downloadbcm5719-llvm-d1ba2efb8f2523bda0face1954d5388b7c88a9fc.tar.gz
bcm5719-llvm-d1ba2efb8f2523bda0face1954d5388b7c88a9fc.zip
[PM] Fix horrible typos that somehow didn't cause a failure in a C++11
build but spectacularly changed behavior of the C++98 build. =] This shows my one problem with not having unittests -- basic API expectations aren't well exercised by the integration tests because they *happen* to not come up, even though they might later. I'll probably add a basic unittest to complement the integration testing later, but I wanted to revive the bots. llvm-svn: 200905
Diffstat (limited to 'llvm/lib/Analysis/LazyCallGraph.cpp')
-rw-r--r--llvm/lib/Analysis/LazyCallGraph.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp
index b89bf70b433..7ae63e27c61 100644
--- a/llvm/lib/Analysis/LazyCallGraph.cpp
+++ b/llvm/lib/Analysis/LazyCallGraph.cpp
@@ -115,9 +115,9 @@ LazyCallGraph::LazyCallGraph(Module &M) : M(M) {
LazyCallGraph::LazyCallGraph(const LazyCallGraph &G)
: M(G.M), EntryNodeSet(G.EntryNodeSet) {
- EntryNodes.reserve(EntryNodes.size());
- for (NodeVectorImplT::iterator EI = EntryNodes.begin(),
- EE = EntryNodes.end();
+ EntryNodes.reserve(G.EntryNodes.size());
+ for (NodeVectorImplT::const_iterator EI = G.EntryNodes.begin(),
+ EE = G.EntryNodes.end();
EI != EE; ++EI)
if (Function *Callee = EI->dyn_cast<Function *>())
EntryNodes.push_back(Callee);
@@ -132,12 +132,14 @@ LazyCallGraph::LazyCallGraph(const LazyCallGraph &G)
LazyCallGraph::LazyCallGraph(LazyCallGraph &&G)
: M(G.M), EntryNodes(std::move(G.EntryNodes)),
EntryNodeSet(std::move(G.EntryNodeSet)) {
- // Loop over our EntryNodes. They've been moved from another graph, but we
- // need to move the Node*s to live under our bump ptr allocator.
- for (NodeVectorImplT::iterator EI = EntryNodes.begin(), EE = EntryNodes.end();
+ // Loop over our EntryNodes. They've been moved from another graph, so we
+ // need to move the Node*s to live under our bump ptr allocator. We can just
+ // do this in-place.
+ for (NodeVectorImplT::iterator EI = EntryNodes.begin(),
+ EE = EntryNodes.end();
EI != EE; ++EI)
if (Node *EntryN = EI->dyn_cast<Node *>())
- *EI = G.moveInto(std::move(*EntryN));
+ *EI = moveInto(std::move(*EntryN));
}
#endif
OpenPOWER on IntegriCloud