blob: 10987a59275d69dc63a205e45146b89aea3fe900 (
plain)
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
|
#ifndef REG_COLOR_MAP
#define REG_COLOR_MAP
#include <hash_map>
#ifndef VALUE_SET_H
struct hashFuncValue { // sturcture containing the hash func
inline size_t operator () (const Value *const val) const
{ return (size_t) val; }
};
#endif
typedef int RegColorType;
class RegColorMap : hash_map <const Value *, RegColorType, hashFuncValue>
{
public:
inline void setRegColor(const Value *const Val, RegColorType Col) {
(*this)[Val] = Col;
}
inline RegColorType getRegColor(const Value *const Val) {
return (*this)[Val];
}
};
#endif
|