diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-31 19:35:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-31 19:35:16 +0000 |
commit | 6c5fd8e0551f99ce46908fedd502b0dbf5864c74 (patch) | |
tree | 1970621dbda53202dfb1e049450a7b4ca25ae260 /tools | |
parent | b55cae23cb9bd6661093e8c2822be4fd721587e1 (diff) | |
download | llvm-6c5fd8e0551f99ce46908fedd502b0dbf5864c74.tar.gz llvm-6c5fd8e0551f99ce46908fedd502b0dbf5864c74.tar.bz2 llvm-6c5fd8e0551f99ce46908fedd502b0dbf5864c74.tar.xz |
The tarjan iterator now returns a reference to the current SCC, not a possibly null pointer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/analyze/PrintSCC.cpp | 4 | ||||
-rw-r--r-- | tools/opt/PrintSCC.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/analyze/PrintSCC.cpp b/tools/analyze/PrintSCC.cpp index 83dd16dcf3..7affce6131 100644 --- a/tools/analyze/PrintSCC.cpp +++ b/tools/analyze/PrintSCC.cpp @@ -59,7 +59,7 @@ bool CFGSCC::runOnFunction(Function &F) { std::cout << "SCCs for Function " << F.getName() << " in PostOrder:"; for (TarjanSCC_iterator<Function*> I = tarj_begin(&F), E = tarj_end(&F); I != E; ++I) { - SCC<Function*> &nextSCC = **I; + SCC<Function*> &nextSCC = *I; std::cout << "\nSCC #" << ++sccNum << " : "; for (SCC<Function*>::const_iterator I = nextSCC.begin(), E = nextSCC.end(); I != E; ++I) @@ -80,7 +80,7 @@ bool CallGraphSCC::run(Module &M) { std::cout << "SCCs for the program in PostOrder:"; for (TarjanSCC_iterator<CallGraphNode*> SCCI = tarj_begin(rootNode), E = tarj_end(rootNode); SCCI != E; ++SCCI) { - const SCC<CallGraphNode*> &nextSCC = **SCCI; + const SCC<CallGraphNode*> &nextSCC = *SCCI; std::cout << "\nSCC #" << ++sccNum << " : "; for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(), E = nextSCC.end(); I != E; ++I) diff --git a/tools/opt/PrintSCC.cpp b/tools/opt/PrintSCC.cpp index 83dd16dcf3..7affce6131 100644 --- a/tools/opt/PrintSCC.cpp +++ b/tools/opt/PrintSCC.cpp @@ -59,7 +59,7 @@ bool CFGSCC::runOnFunction(Function &F) { std::cout << "SCCs for Function " << F.getName() << " in PostOrder:"; for (TarjanSCC_iterator<Function*> I = tarj_begin(&F), E = tarj_end(&F); I != E; ++I) { - SCC<Function*> &nextSCC = **I; + SCC<Function*> &nextSCC = *I; std::cout << "\nSCC #" << ++sccNum << " : "; for (SCC<Function*>::const_iterator I = nextSCC.begin(), E = nextSCC.end(); I != E; ++I) @@ -80,7 +80,7 @@ bool CallGraphSCC::run(Module &M) { std::cout << "SCCs for the program in PostOrder:"; for (TarjanSCC_iterator<CallGraphNode*> SCCI = tarj_begin(rootNode), E = tarj_end(rootNode); SCCI != E; ++SCCI) { - const SCC<CallGraphNode*> &nextSCC = **SCCI; + const SCC<CallGraphNode*> &nextSCC = *SCCI; std::cout << "\nSCC #" << ++sccNum << " : "; for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(), E = nextSCC.end(); I != E; ++I) |