blob: d0af35182b9607ad7bd4019286799e6d044812bd (
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
|
#pragma once
#include <map>
struct Reason {
inline bool is_escaping() const {
return this->global_is_visible
|| this->parameter_is_visible
|| this->return_is_visible
|| this->type_is_casted
|| this->type_is_volatile
|| this->type_is_in_union
|| this->is_indirect;
}
bool global_is_visible : 1;
bool parameter_is_visible : 1;
bool return_is_visible : 1;
bool type_is_casted : 1;
bool type_is_volatile : 1;
bool type_is_in_union : 1;
bool is_indirect : 1;
Reason operator|(const Reason &);
Reason& operator|=(const Reason &);
void print() const;
Reason() : global_is_visible(0), parameter_is_visible(0), return_is_visible(0), type_is_casted(0), type_is_volatile(0), type_is_in_union(0), is_indirect(0) {};
};
typedef std::map<const_tree, Reason> typemap;
|