From 7f1a4e26bde1165004bb2abeb2c4bfc9b5a782bb Mon Sep 17 00:00:00 2001 From: nemerle Date: Fri, 20 May 2016 10:23:00 +0200 Subject: [PATCH] Fix struct/class confusion for Function class. --- include/BasicBlock.h | 4 ++-- include/Procedure.h | 6 +++--- include/ast.h | 2 +- include/disassem.h | 2 +- include/graph.h | 2 +- include/icode.h | 2 +- include/symtab.h | 2 +- src/Command.h | 2 +- src/chklib.h | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/BasicBlock.h b/include/BasicBlock.h index 6609ccb..bd9b468 100644 --- a/include/BasicBlock.h +++ b/include/BasicBlock.h @@ -9,7 +9,7 @@ #include "graph.h" //#include "icode.h" /* Basic block (BB) node definition */ -struct Function; +class Function; class CIcodeRec; struct BB; struct LOCAL_ID; @@ -27,7 +27,7 @@ struct TYPEADR_TYPE }; struct BB { - friend struct Function; + friend class Function; private: BB(const BB&); BB() : nodeType(0),traversed(DFS_NONE), diff --git a/include/Procedure.h b/include/Procedure.h index 0328736..4b3259a 100644 --- a/include/Procedure.h +++ b/include/Procedure.h @@ -19,11 +19,11 @@ class QTextStream; struct CALL_GRAPH; struct Expr; struct Disassembler; -struct Function; +class Function; struct CALL_GRAPH; struct PROG; struct IStructuredTextTarget; -struct Function; + /* Procedure FLAGS */ enum PROC_FLAGS @@ -119,7 +119,7 @@ public: } void push_back(BB *v) { m_listBB.push_back(v);} }; -typedef std::shared_ptr PtrFunction; +typedef std::shared_ptr PtrFunction; enum DecompilationStep : uint32_t { eNotDecoded, // no processing done yet eDisassemblyInProgress, diff --git a/include/ast.h b/include/ast.h index 08cccc1..8b459ad 100644 --- a/include/ast.h +++ b/include/ast.h @@ -28,7 +28,7 @@ static const condOp condOpJCond[12] = {LESS, LESS_EQUAL, GREATER_EQUAL, GREATER, EQUAL, NOT_EQUAL, LESS, GREATER_EQUAL, LESS_EQUAL, GREATER, GREATER_EQUAL, LESS}; struct AstIdent; -struct Function; +class Function; struct STKFRAME; struct LOCAL_ID; struct ICODE; diff --git a/include/disassem.h b/include/disassem.h index 4e99e4e..8d393b3 100644 --- a/include/disassem.h +++ b/include/disassem.h @@ -14,7 +14,7 @@ #include struct LLInst; -struct Function; +class Function; typedef std::shared_ptr PtrFunction; struct Disassembler diff --git a/include/graph.h b/include/graph.h index cbd5a6a..451131f 100644 --- a/include/graph.h +++ b/include/graph.h @@ -8,7 +8,7 @@ #include #include -struct Function; +class Function; /* Types of basic block nodes */ /* Real basic blocks: type defined according to their out-edges */ enum eBBKind diff --git a/include/icode.h b/include/icode.h index 62178d4..12f0d5a 100644 --- a/include/icode.h +++ b/include/icode.h @@ -25,7 +25,7 @@ struct LOCAL_ID; struct BB; -struct Function; +class Function; struct STKFRAME; class CIcodeRec; struct ICODE; diff --git a/include/symtab.h b/include/symtab.h index 7e59123..2673403 100644 --- a/include/symtab.h +++ b/include/symtab.h @@ -86,7 +86,7 @@ public: void updateSymType(uint32_t symbol, const TypeContainer &tc); SYM *updateGlobSym(uint32_t operand, int size, uint16_t duFlag, bool &inserted_new); }; -struct Function; +class Function; struct SYMTABLE { std::string pSymName; /* Ptr to symbolic name or comment */ diff --git a/src/Command.h b/src/Command.h index 2d3dee5..6bb3e60 100644 --- a/src/Command.h +++ b/src/Command.h @@ -7,7 +7,7 @@ #include class Project; -struct Function; +class Function; typedef std::shared_ptr PtrFunction; enum CommandLevel { eProject, diff --git a/src/chklib.h b/src/chklib.h index f095e58..153efa8 100644 --- a/src/chklib.h +++ b/src/chklib.h @@ -9,7 +9,7 @@ #include #include -struct Function; +class Function; // This will create a PatternLocator instance load it and pass it to project instance. struct LoadPatternLibrary : public Command {