blob: 340108fcf8fce0fd3cc33ffbc68b6266db472c77 (
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
|
#pragma once
inline void
log(const char* const fmt, ...)
{
if (!dump_file) return;
va_list args;
va_start(args, fmt);
vfprintf(dump_file, fmt, args);
va_end(args);
}
inline void
assert_is_complete(const_tree a)
{
gcc_assert(a);
const_tree type_size = TYPE_SIZE(a);
gcc_assert(NULL_TREE != type_size);
}
inline void
assert_is_type(const_tree a, const enum tree_code expected_code)
{
gcc_assert(a);
const enum tree_code observed_code = TREE_CODE(a);
const bool eq_codes = observed_code == expected_code;
gcc_assert(eq_codes);
}
inline void
assert_is_complete_type(const_tree a, const enum tree_code expected_code)
{
//assert_is_complete(a);
assert_is_type(a, expected_code);
}
|