SelectionDAGISel::CodeGenAndEmitDAG() confusion.

Hello everybody,

Following on from the excellent help I received at
http://comments.gmane.org/gmane.comp.compilers.llvm.devel/52591 - I
have a follow up question.

I've been editing the SelectionDAGiSel.cpp to try and print out the
operations in the nodes, to this end I have modified the
SelectionDAGISel::CodeGenAndEmitDAG() function as follows

void SelectionDAGISel::CodeGenAndEmitDAG() {
  std::string GroupName;
//JOE'S EDITS START
    std::cout<<"Hello everybody Joe was here!"<<std::endl;
    for (SelectionDAG::allnodes_iterator I =
CurDAG->allnodes_begin(),E = CurDAG->allnodes_end(); I != E; ++I)
    {
        std::cout<<"start"<<I->getOperationName(CurDAG)<<std::endl;

    }
//JOE'S EDITS END

...and, for santity checking purposes, I've added similar code at the end...

// Free the SelectionDAG state, now that we're finished with it.
//JOE'S EDITS START
    for (SelectionDAG::allnodes_iterator I =
CurDAG->allnodes_begin(),E = CurDAG->allnodes_end(); I != E; ++I)
    {
        std::cout<<"hey"<<I->getOperationName(CurDAG)<<std::endl;
    }

    HandleSDNode Dummy(CurDAG->getRoot());
//JOE'S EDITS END
  CurDAG->clear();
}

The files make fine but when I run clang on an input file I get

Cobrakai$./clang temp.c
temp.c:4:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main()
^~~~
Hello everybody Joe was here!
startEntryToken
heyEntryToken
1 warning generated.
Cobrakai$

...which implies that either my itterator is not working as I expect
it would (I expect many more than one node), or the selectionDAG has
only one node... which would be odd - can anyone point me in the right
direction for this?

PS - here is my test file, in case it's useful.

Cobrakai$more temp.c
/* Fibonacci Series c language */
#include<stdio.h>

main()
{
int n, first = 0, second = 1, next, c;

printf("Enter the number of terms\n");
scanf("%d",&n);

printf("First %d terms of Fibonacci series are :-\n",n);

for ( c = 0 ; c < n ; c++ )
{
if ( c <= 1 )
next = c;
else
{
next = first + second;
first = second;
second = next;
}
printf("%d\n",next);
}
return 0;
}
Cobrakai$