| 1 |
#include <cstdarg> |
| 2 |
#include <cstdint> |
| 3 |
#include <cstdlib> |
| 4 |
#include <ostream> |
| 5 |
#include <new> |
| 6 |
|
| 7 |
enum class MyCLikeEnum { |
| 8 |
Foo1, |
| 9 |
Bar1, |
| 10 |
Baz1, |
| 11 |
}; |
| 12 |
|
| 13 |
enum class MyCLikeEnum_Prepended { |
| 14 |
Foo1_Prepended, |
| 15 |
Bar1_Prepended, |
| 16 |
Baz1_Prepended, |
| 17 |
}; |
| 18 |
|
| 19 |
struct MyFancyStruct { |
| 20 |
int32_t i; |
| 21 |
#ifdef __cplusplus |
| 22 |
inline void foo(); |
| 23 |
#endif |
| 24 |
}; |
| 25 |
|
| 26 |
struct MyFancyEnum { |
| 27 |
enum class Tag { |
| 28 |
Foo, |
| 29 |
Bar, |
| 30 |
Baz, |
| 31 |
}; |
| 32 |
|
| 33 |
struct Bar_Body { |
| 34 |
int32_t _0; |
| 35 |
}; |
| 36 |
|
| 37 |
struct Baz_Body { |
| 38 |
int32_t _0; |
| 39 |
}; |
| 40 |
|
| 41 |
Tag tag; |
| 42 |
union { |
| 43 |
Bar_Body bar; |
| 44 |
Baz_Body baz; |
| 45 |
}; |
| 46 |
#ifdef __cplusplus |
| 47 |
inline void wohoo(); |
| 48 |
#endif |
| 49 |
}; |
| 50 |
|
| 51 |
union MyUnion { |
| 52 |
float f; |
| 53 |
uint32_t u; |
| 54 |
int32_t extra_member; |
| 55 |
}; |
| 56 |
|
| 57 |
struct MyFancyStruct_Prepended { |
| 58 |
#ifdef __cplusplus |
| 59 |
inline void prepended_wohoo(); |
| 60 |
#endif |
| 61 |
int32_t i; |
| 62 |
}; |
| 63 |
|
| 64 |
struct MyFancyEnum_Prepended { |
| 65 |
#ifdef __cplusplus |
| 66 |
inline void wohoo(); |
| 67 |
#endif |
| 68 |
enum class Tag { |
| 69 |
Foo_Prepended, |
| 70 |
Bar_Prepended, |
| 71 |
Baz_Prepended, |
| 72 |
}; |
| 73 |
|
| 74 |
struct Bar_Prepended_Body { |
| 75 |
int32_t _0; |
| 76 |
}; |
| 77 |
|
| 78 |
struct Baz_Prepended_Body { |
| 79 |
int32_t _0; |
| 80 |
}; |
| 81 |
|
| 82 |
Tag tag; |
| 83 |
union { |
| 84 |
Bar_Prepended_Body bar_prepended; |
| 85 |
Baz_Prepended_Body baz_prepended; |
| 86 |
}; |
| 87 |
}; |
| 88 |
|
| 89 |
union MyUnion_Prepended { |
| 90 |
int32_t extra_member; |
| 91 |
float f; |
| 92 |
uint32_t u; |
| 93 |
}; |
| 94 |
|
| 95 |
extern "C" { |
| 96 |
|
| 97 |
void root(MyFancyStruct s, |
| 98 |
MyFancyEnum e, |
| 99 |
MyCLikeEnum c, |
| 100 |
MyUnion u, |
| 101 |
MyFancyStruct_Prepended sp, |
| 102 |
MyFancyEnum_Prepended ep, |
| 103 |
MyCLikeEnum_Prepended cp, |
| 104 |
MyUnion_Prepended up); |
| 105 |
|
| 106 |
} // extern "C" |