mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user