slowly replacing ICODE * with iterators

This commit is contained in:
Artur K
2011-12-13 21:03:35 +01:00
parent 87d1b4411c
commit b3fa570792
10 changed files with 59 additions and 47 deletions

View File

@@ -6,12 +6,14 @@
#include <llvm/ADT/ilist_node.h>
#include "types.h"
#include "graph.h"
#include "icode.h"
/* Basic block (BB) node definition */
struct Function;
class CIcodeRec;
struct BB;
struct interval;
struct ICODE;
typedef union
{
dword ip; /* Out edge icode address */
@@ -38,6 +40,8 @@ private:
public:
Int begin();
iICODE begin2();
iICODE end2();
Int end();
Int rbegin();
Int rend();
@@ -103,6 +107,7 @@ public:
const Function *getParent() const { return Parent; }
Function *getParent() { return Parent; }
void writeBB(ICODE *hli, Int lev, Function *pProc, Int *numLoc);
BB *rmJMP(Int marker, BB *pBB);
private:
Function *Parent;

View File

@@ -372,3 +372,4 @@ public:
boolT labelSrch(dword target, Int *pIndex);
ICODE * GetIcode(int ip);
};
typedef CIcodeRec::iterator iICODE;

View File

@@ -4,6 +4,7 @@
****************************************************************************/
/* STATE TABLE */
#include <cstring>
struct STATE
{
dword IP; /* Offset into Image */