/
body.cpp
106 lines (89 loc) · 1.47 KB
/
body.cpp
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <ostream>
#include <new>
enum class MyCLikeEnum {
Foo1,
Bar1,
Baz1,
};
enum class MyCLikeEnum_Prepended {
Foo1_Prepended,
Bar1_Prepended,
Baz1_Prepended,
};
struct MyFancyStruct {
int32_t i;
#ifdef __cplusplus
inline void foo();
#endif
};
struct MyFancyEnum {
enum class Tag {
Foo,
Bar,
Baz,
};
struct Bar_Body {
int32_t _0;
};
struct Baz_Body {
int32_t _0;
};
Tag tag;
union {
Bar_Body bar;
Baz_Body baz;
};
#ifdef __cplusplus
inline void wohoo();
#endif
};
union MyUnion {
float f;
uint32_t u;
int32_t extra_member;
};
struct MyFancyStruct_Prepended {
#ifdef __cplusplus
inline void prepended_wohoo();
#endif
int32_t i;
};
struct MyFancyEnum_Prepended {
#ifdef __cplusplus
inline void wohoo();
#endif
enum class Tag {
Foo_Prepended,
Bar_Prepended,
Baz_Prepended,
};
struct Bar_Prepended_Body {
int32_t _0;
};
struct Baz_Prepended_Body {
int32_t _0;
};
Tag tag;
union {
Bar_Prepended_Body bar_prepended;
Baz_Prepended_Body baz_prepended;
};
};
union MyUnion_Prepended {
int32_t extra_member;
float f;
uint32_t u;
};
extern "C" {
void root(MyFancyStruct s,
MyFancyEnum e,
MyCLikeEnum c,
MyUnion u,
MyFancyStruct_Prepended sp,
MyFancyEnum_Prepended ep,
MyCLikeEnum_Prepended cp,
MyUnion_Prepended up);
} // extern "C"