Mercurial > projects > ldc
comparison gen/tollvm.h @ 88:058d3925950e trunk
[svn r92] Fixed support for statically initialized unions. lots of bugfixes as cleanups too.
author | lindquist |
---|---|
date | Tue, 06 Nov 2007 10:03:14 +0100 |
parents | fd32135dca3e |
children | ccca1c13e13a |
comparison
equal
deleted
inserted
replaced
87:25d4fcce53f4 | 88:058d3925950e |
---|---|
1 #ifndef LLVMDC_GEN_TOLLVM_H | 1 #ifndef LLVMDC_GEN_TOLLVM_H |
2 #define LLVMDC_GEN_TOLLVM_H | 2 #define LLVMDC_GEN_TOLLVM_H |
3 | 3 |
4 // D -> LLVM helpers | 4 // D -> LLVM helpers |
5 | 5 |
6 struct StructInitializer; | |
7 struct DValue; | 6 struct DValue; |
8 | 7 |
9 const llvm::Type* DtoType(Type* t); | 8 const llvm::Type* DtoType(Type* t); |
10 bool DtoIsPassedByRef(Type* type); | 9 bool DtoIsPassedByRef(Type* type); |
11 Type* DtoDType(Type* t); | 10 Type* DtoDType(Type* t); |
12 | |
13 const llvm::Type* DtoStructType(Type* t); | |
14 llvm::Value* DtoStructZeroInit(llvm::Value* v); | |
15 llvm::Value* DtoStructCopy(llvm::Value* dst, llvm::Value* src); | |
16 llvm::Constant* DtoConstStructInitializer(StructInitializer* si); | |
17 | 11 |
18 const llvm::FunctionType* DtoFunctionType(Type* t, const llvm::Type* thistype, bool ismain = false); | 12 const llvm::FunctionType* DtoFunctionType(Type* t, const llvm::Type* thistype, bool ismain = false); |
19 const llvm::FunctionType* DtoFunctionType(FuncDeclaration* fdecl); | 13 const llvm::FunctionType* DtoFunctionType(FuncDeclaration* fdecl); |
20 llvm::Function* DtoDeclareFunction(FuncDeclaration* fdecl); | 14 llvm::Function* DtoDeclareFunction(FuncDeclaration* fdecl); |
21 | 15 |
64 llvm::ConstantInt* DtoConstInt(int i); | 58 llvm::ConstantInt* DtoConstInt(int i); |
65 llvm::Constant* DtoConstString(const char*); | 59 llvm::Constant* DtoConstString(const char*); |
66 llvm::Constant* DtoConstStringPtr(const char* str, const char* section = 0); | 60 llvm::Constant* DtoConstStringPtr(const char* str, const char* section = 0); |
67 llvm::Constant* DtoConstBool(bool); | 61 llvm::Constant* DtoConstBool(bool); |
68 | 62 |
69 llvm::Value* DtoIndexStruct(llvm::Value* ptr, StructDeclaration* sd, Type* t, unsigned os, std::vector<unsigned>& idxs); | 63 bool DtoIsTemplateInstance(Dsymbol* s); |
70 | 64 |
71 bool DtoIsTemplateInstance(Dsymbol* s); | 65 void DtoLazyStaticInit(bool istempl, llvm::Value* gvar, Initializer* init, Type* t); |
72 | 66 |
73 // llvm wrappers | 67 // llvm wrappers |
74 void DtoMemCpy(llvm::Value* dst, llvm::Value* src, llvm::Value* nbytes); | 68 void DtoMemCpy(llvm::Value* dst, llvm::Value* src, llvm::Value* nbytes); |
75 bool DtoCanLoad(llvm::Value* ptr); | 69 bool DtoCanLoad(llvm::Value* ptr); |
76 llvm::Value* DtoLoad(llvm::Value* src); | 70 llvm::Value* DtoLoad(llvm::Value* src); |