[llvm-commits] CVS: llvm/lib/Analysis/PrintSCC.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Aug 31 14:36:09 PDT 2003
Changes in directory llvm/lib/Analysis:
PrintSCC.cpp updated: 1.3 -> 1.4
---
Log message:
The tarjan iterator now returns a reference to the current SCC, not a possibly null pointer!
---
Diffs of the changes:
Index: llvm/lib/Analysis/PrintSCC.cpp
diff -u llvm/lib/Analysis/PrintSCC.cpp:1.3 llvm/lib/Analysis/PrintSCC.cpp:1.4
--- llvm/lib/Analysis/PrintSCC.cpp:1.3 Sun Aug 31 14:27:11 2003
+++ llvm/lib/Analysis/PrintSCC.cpp Sun Aug 31 14:35:14 2003
@@ -59,7 +59,7 @@
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 @@
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)
More information about the llvm-commits
mailing list