From 5328c6fd9708b1727e534ecaeda8cc96fb6a81e8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 26 Feb 2002 19:40:28 +0000 Subject: * Changes to compile successfully with GCC 3.0 * Eliminated memory leak in processGraph * Pass vectors by const reference to moveDummyCode instead of by copy llvm-svn: 1808 --- .../Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp') diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp index e09a85790e9..03a3e4bcca7 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp @@ -36,8 +36,8 @@ using std::vector; -static Node *findBB(set &st, BasicBlock *BB){ - for(set::iterator si=st.begin(); si!=st.end(); ++si){ +static Node *findBB(std::set &st, BasicBlock *BB){ + for(std::set::iterator si=st.begin(); si!=st.end(); ++si){ if(((*si)->getElement())==BB){ return *si; } @@ -95,7 +95,7 @@ bool ProfilePaths::runOnMethod(Method *M){ if (M->getBasicBlocks().size() == 1) { //The graph is made acyclic: this is done //by removing back edges for now, and adding them later on - vector be; + vector be; g.getBackEdges(be); #ifdef DEBUG_PATH_PROFILES cerr<<"Backedges:"<b (in vector stDummy) //and 2. from a->exit (in vector exDummy) - vector stDummy; - vector exDummy; + vector stDummy; + vector exDummy; addDummyEdges(stDummy, exDummy, g, be); //Now, every edge in the graph is assigned a weight -- cgit v1.2.3