blob: ba4818ff2888f5eb7330ef9c60c8e91152259935 (
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
38
39
40
|
#pragma once
#include "type-walker.hpp"
#include "ipa-prototype.h"
#include "collect-types.h"
#include <map>
class TypeEscaper : public TypeWalker
{
public:
TypeEscaper(ptrset_t &p) : _ptrset(p), _inside_union(0), _inside_field(0), _inside_indirect_field(0) {};
void update(const_tree t, Reason r);
void update_single_level(const_tree t, Reason r);
ptrset_t get_sets();
ptrset_t &_ptrset;
typemap calc;
void print_reasons();
private:
virtual void _walk_POINTER_TYPE_pre(const_tree t) final;
virtual void _walk_POINTER_TYPE_post(const_tree t) final;
virtual void _walk_REFERENCE_TYPE_pre(const_tree t) final;
virtual void _walk_ARRAY_TYPE_pre(const_tree t) final;
virtual void _walk_RECORD_TYPE_pre(const_tree t) final;
virtual void _walk_UNION_TYPE_pre(const_tree t) final;
virtual void _walk_UNION_TYPE_post(const_tree t) final;
virtual void _walk_METHOD_TYPE_pre(const_tree t) final;
virtual void _walk_FUNCTION_TYPE_pre(const_tree t) final;
virtual void _walk_METHOD_TYPE(const_tree t) final;
virtual void _walk_FUNCTION_TYPE(const_tree t) final;
virtual void _walk_field_pre(const_tree t) final;
virtual void _walk_field_post(const_tree t) final;
virtual bool is_memoized(const_tree t);
unsigned _inside_union;
unsigned _inside_field;
unsigned _inside_indirect_field;
Reason _reason;
void _update(const_tree t);
void place_escaping_types_in_set();
};
|