comparison gen/structs.h @ 1353:45aca7e7cc88

Remove struct padding when passing or returning in registers on x86-64 (extern(D) only)
author Frits van Bommel <fvbommel wxs.nl>
date Thu, 14 May 2009 20:36:55 +0200
parents 3cf0066e6faf
children
comparison
equal deleted inserted replaced
1352:b9f5f7c5db73 1353:45aca7e7cc88
16 LLValue* DtoStructEquals(TOK op, DValue* lhs, DValue* rhs); 16 LLValue* DtoStructEquals(TOK op, DValue* lhs, DValue* rhs);
17 17
18 /// index a struct one level 18 /// index a struct one level
19 LLValue* DtoIndexStruct(LLValue* src, StructDeclaration* sd, VarDeclaration* vd); 19 LLValue* DtoIndexStruct(LLValue* src, StructDeclaration* sd, VarDeclaration* vd);
20 20
21 /// Return the type returned by DtoUnpaddedStruct called on a value of the
22 /// specified type.
23 /// Union types will get expanded into a struct, with a type for each member.
24 LLType* DtoUnpaddedStructType(Type* dty);
25
26 /// Return the struct value represented by v without the padding fields.
27 /// Unions will be expanded, with a value for each member.
28 /// Note: v must be a pointer to a struct, but the return value will be a
29 /// first-class struct value.
30 LLValue* DtoUnpaddedStruct(Type* dty, LLValue* v);
31
32 /// Undo the transformation performed by DtoUnpaddedStruct, writing to lval.
33 void DtoPaddedStruct(Type* dty, LLValue* v, LLValue* lval);
34
21 #endif 35 #endif