Mercurial > projects > ldc
comparison gen/structs.h @ 1151:3cf0066e6faf
- Versioned Expresssion::toElem with #if IN_DMD/IN_LLVM.
- Eliminated the DLRValue DValue.
- Implemented proactive handling of l-value CastExpS.
- Minor tweak in runtime memory.d .
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Sat, 28 Mar 2009 05:00:43 +0100 |
parents | af7a6faf9406 |
children | 45aca7e7cc88 |
comparison
equal
deleted
inserted
replaced
1150:2a687353c84d | 1151:3cf0066e6faf |
---|---|
1 #ifndef LLVMD_GEN_STRUCTS_H | 1 #ifndef LLVMD_GEN_STRUCTS_H |
2 #define LLVMD_GEN_STRUCTS_H | 2 #define LLVMD_GEN_STRUCTS_H |
3 | 3 |
4 struct StructInitializer; | 4 struct StructInitializer; |
5 | 5 |
6 /// Generate code for the struct. | |
7 void DtoResolveStruct(StructDeclaration* sd); | |
8 | |
9 /// Build constant struct initializer. | |
6 LLConstant* DtoConstStructInitializer(StructInitializer* si); | 10 LLConstant* DtoConstStructInitializer(StructInitializer* si); |
11 | |
12 /// Build values for a struct literal. | |
7 std::vector<llvm::Value*> DtoStructLiteralValues(const StructDeclaration* sd, const std::vector<llvm::Value*>& inits); | 13 std::vector<llvm::Value*> DtoStructLiteralValues(const StructDeclaration* sd, const std::vector<llvm::Value*>& inits); |
8 | 14 |
9 /** | 15 /// Returns a boolean=true if the two structs are equal. |
10 * Resolves the llvm type for a struct | |
11 */ | |
12 void DtoResolveStruct(StructDeclaration* sd); | |
13 | |
14 /** | |
15 * Provides the llvm declaration for a struct | |
16 */ | |
17 void DtoDeclareStruct(StructDeclaration* sd); | |
18 | |
19 /** | |
20 * Constructs the constant default initializer a struct | |
21 */ | |
22 void DtoConstInitStruct(StructDeclaration* sd); | |
23 | |
24 /** | |
25 * Provides the llvm definition for a struct | |
26 */ | |
27 void DtoDefineStruct(StructDeclaration* sd); | |
28 | |
29 /** | |
30 * Returns a boolean=true if the two structs are equal | |
31 */ | |
32 LLValue* DtoStructEquals(TOK op, DValue* lhs, DValue* rhs); | 16 LLValue* DtoStructEquals(TOK op, DValue* lhs, DValue* rhs); |
33 | 17 |
34 // index a struct one level | 18 /// index a struct one level |
35 LLValue* DtoIndexStruct(LLValue* src, StructDeclaration* sd, VarDeclaration* vd); | 19 LLValue* DtoIndexStruct(LLValue* src, StructDeclaration* sd, VarDeclaration* vd); |
36 | 20 |
37 #endif | 21 #endif |