Pull iterators out of CFG.h and CFGdecls and put them in Support directory

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@664 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-09-28 22:56:31 +00:00
parent c56d779501
commit 3ff4387113
24 changed files with 284 additions and 458 deletions

View File

@ -23,7 +23,8 @@
#include "llvm/Bytecode/Reader.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Method.h"
#include "llvm/CFG.h"
#include "llvm/Support/DepthFirstIterator.h"
#include "llvm/Support/PostOrderIterator.h"
// OutputMode - The different orderings to print basic blocks in...
enum OutputMode {
@ -99,19 +100,19 @@ int main(int argc, char **argv) {
switch (WriteMode) {
case dfo: // Depth First ordering
copy(cfg::df_begin(M), cfg::df_end(M),
copy(df_begin(M), df_end(M),
ostream_iterator<BasicBlock*>(*Out, "\n"));
break;
case rdfo: // Reverse Depth First ordering
copy(cfg::df_begin(M, true), cfg::df_end(M),
copy(df_begin(M, true), df_end(M),
ostream_iterator<BasicBlock*>(*Out, "\n"));
break;
case po: // Post Order
copy(cfg::po_begin(M), cfg::po_end(M),
copy(po_begin(M), po_end(M),
ostream_iterator<BasicBlock*>(*Out, "\n"));
break;
case rpo: { // Reverse Post Order
cfg::ReversePostOrderTraversal RPOT(M);
ReversePostOrderTraversal RPOT(M);
copy(RPOT.begin(), RPOT.end(),
ostream_iterator<BasicBlock*>(*Out, "\n"));
break;