From 92d5e30e762601ce1076e548d2281fac39e40fe3 Mon Sep 17 00:00:00 2001 From: Anand Shukla Date: Fri, 14 Feb 2003 20:41:53 +0000 Subject: Changes to runtime framework git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5572 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp') diff --git a/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp b/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp index c6a98712fa..50497fdf10 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp @@ -151,7 +151,7 @@ bool Graph::hasEdgeAndWt(Edge ed){ return false; Node *nd2=ed.getSecond(); - nodeList nli = nodes[ed.getFirst()];//getNodeList(ed.getFirst()); + nodeList &nli = nodes[ed.getFirst()];//getNodeList(ed.getFirst()); for(nodeList::iterator NI=nli.begin(), NE=nli.end(); NI!=NE; ++NI) if(*NI->element == *nd2 && ed.getWeight()==NI->weight) @@ -400,7 +400,7 @@ Graph* Graph::getMaxSpanningTree(){ //assign wt(v) to all adjacent vertices v of u //only if v is in vt - Graph::nodeList nl=getNodeList(u); + Graph::nodeList &nl = getNodeList(u); for(nodeList::iterator NI=nl.begin(), NE=nl.end(); NI!=NE; ++NI){ Node *v=NI->element; int weight=-NI->weight; @@ -437,7 +437,7 @@ void Graph::printGraph(){ cerr<<"Graph---------------------\n"; for(vector::iterator LI=lt.begin(), LE=lt.end(); LI!=LE; ++LI){ cerr<<((*LI)->getElement())->getName()<<"->"; - Graph::nodeList nl=getNodeList(*LI); + Graph::nodeList &nl = getNodeList(*LI); for(Graph::nodeList::iterator NI=nl.begin(), NE=nl.end(); NI!=NE; ++NI){ cerr<<":"<<"("<<(NI->element->getElement()) ->getName()<<":"<element->getWeight()<<","<weight<<")"; @@ -483,7 +483,7 @@ void Graph::makeUnDirectional(){ vector allNodes=getAllNodes(); for(vector::iterator NI=allNodes.begin(), NE=allNodes.end(); NI!=NE; ++NI) { - nodeList nl=getNodeList(*NI); + nodeList &nl = getNodeList(*NI); for(nodeList::iterator NLI=nl.begin(), NLE=nl.end(); NLI!=NLE; ++NLI){ Edge ed(NLI->element, *NI, NLI->weight); if(!hasEdgeAndWt(ed)){ @@ -502,7 +502,7 @@ void Graph::reverseWts(){ vector allNodes=getAllNodes(); for(vector::iterator NI=allNodes.begin(), NE=allNodes.end(); NI!=NE; ++NI) { - nodeList node_list=getNodeList(*NI); + nodeList &node_list = getNodeList(*NI); for(nodeList::iterator NLI=nodes[*NI].begin(), NLE=nodes[*NI].end(); NLI!=NLE; ++NLI) NLI->weight=-NLI->weight; -- cgit v1.2.3