diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-26 19:40:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-26 19:40:28 +0000 |
commit | fd1717d03bf3fb5b44e49d9d53bd2fb7236937e1 (patch) | |
tree | 82ad6d93b06b3a568d9daf95a7a6e7217b178821 /lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp | |
parent | 2d9bbfdfc432519f22263e7c5c7b421419becfee (diff) |
* Changes to compile successfully with GCC 3.0
* Eliminated memory leak in processGraph
* Pass vectors by const reference to moveDummyCode instead of by copy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1808 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp index e09a85790e..03a3e4bcca 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp @@ -36,8 +36,8 @@ using std::vector; -static Node *findBB(set<Node *> &st, BasicBlock *BB){ - for(set<Node *>::iterator si=st.begin(); si!=st.end(); ++si){ +static Node *findBB(std::set<Node *> &st, BasicBlock *BB){ + for(std::set<Node *>::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<Edge > be; + vector<Edge> be; g.getBackEdges(be); #ifdef DEBUG_PATH_PROFILES cerr<<"Backedges:"<<be.size()<<endl; @@ -106,8 +106,8 @@ bool ProfilePaths::runOnMethod(Method *M){ //Then we add 2 back edges for it: //1. from root->b (in vector stDummy) //and 2. from a->exit (in vector exDummy) - vector<Edge > stDummy; - vector<Edge > exDummy; + vector<Edge> stDummy; + vector<Edge> exDummy; addDummyEdges(stDummy, exDummy, g, be); //Now, every edge in the graph is assigned a weight |