-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfunc.h
executable file
·69 lines (56 loc) · 1.45 KB
/
func.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef __FUNC_H__
#define __FUNC_H__
#include "cfg.h"
#include <set>
#include <map>
class Cfg;
class Function;
class Prog;
class Function {
private:
Cfg *cfg;
Prog *prog;
std::string name;
std::string module;
std::string prototype;
addr_t address;
size_t size;
int argumentsno;
bool pending;
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive & ar, const unsigned int version) {
ar & address;
ar & size;
ar & name;
ar & module;
ar & cfg;
(void)version;
}
void guessArgumentsNo();
public:
Function() {argumentsno = -1; cfg = NULL; pending = false; prog = NULL;}
Function(addr_t a);
Function(std::string n, addr_t a, size_t l, std::string m);
~Function();
const char *getName() const;
const char *getModule() const;
Cfg *getCfg();
addr_t getAddress() const;
size_t getSize() const;
int getArgumentsNo();
void setSize(size_t s) { size = s; }
void setModule(const char *m) { module = m; }
void setName(const char *n) { name = n; }
void setAddress(addr_t a) { address = a; }
bool isPending() { return pending; }
void setPending(bool b) { pending = b; }
void setProg(Prog *p) { prog = p; }
Prog *getProg() { assert(prog); return prog; }
};
#endif
// Local Variables:
// mode: c++
// c-basic-offset: 4
// compile-command: "dchroot -c typeinfer -d make"
// End: