| author | |
| committer | |
| log | ab99dd9c5d22a3d927453081654b1f75b2521b48 |
| tree | b865c84391aa83a9985e5d1678ac015e785345d8 |
| parent | 7fdd60df1c40bc36a8e0b35be3e35f81dd97fbce |
Fixes the compiler build for various targets, especially 32-bit.2 files changed, 19 insertions(+), 7 deletions(-)
src/clang.zig+9-3| ... | @@ -37,9 +37,15 @@ pub const QualType = extern struct { | ... | @@ -37,9 +37,15 @@ pub const QualType = extern struct { |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | pub const APValueLValueBase = extern struct { | 39 | pub const APValueLValueBase = extern struct { |
| 40 | Ptr: ?*anyopaque, | 40 | Ptr: ?*anyopaque align(@alignOf(u64)), |
| 41 | CallIndex: c_uint, | 41 | State: extern union { |
| 42 | Version: c_uint, | 42 | Local: extern struct { |
| 43 | CallIndex: c_uint, | ||
| 44 | Version: c_uint, | ||
| 45 | }, | ||
| 46 | TypeInfoType: ?*anyopaque, | ||
| 47 | DynamicAllocType: ?*anyopaque, | ||
| 48 | }, | ||
| 43 | 49 | ||
| 44 | pub const dyn_cast_Expr = ZigClangAPValueLValueBase_dyn_cast_Expr; | 50 | pub const dyn_cast_Expr = ZigClangAPValueLValueBase_dyn_cast_Expr; |
| 45 | extern fn ZigClangAPValueLValueBase_dyn_cast_Expr(APValueLValueBase) ?*const Expr; | 51 | extern fn ZigClangAPValueLValueBase_dyn_cast_Expr(APValueLValueBase) ?*const Expr; |
src/zig_clang.h+10-4| ... | @@ -43,10 +43,16 @@ struct ZigClangQualType { | ... | @@ -43,10 +43,16 @@ struct ZigClangQualType { |
| 43 | void *ptr; | 43 | void *ptr; |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | struct ZigClangAPValueLValueBase { | 46 | struct alignas(uint64_t) ZigClangAPValueLValueBase { |
| 47 | void *Ptr; | 47 | void* Ptr; |
| 48 | unsigned CallIndex; | 48 | union { |
| 49 | unsigned Version; | 49 | struct { |
| 50 | unsigned CallIndex; | ||
| 51 | unsigned Version; | ||
| 52 | } Local; | ||
| 53 | void* TypeInfoType; | ||
| 54 | void* DynamicAllocType; | ||
| 55 | }; | ||
| 50 | }; | 56 | }; |
| 51 | 57 | ||
| 52 | enum ZigClangAPValueKind { | 58 | enum ZigClangAPValueKind { |