Mercurial > projects > ldc
diff gen/tollvm.h @ 94:61615fa85940 trunk
[svn r98] Added support for std.c.stdlib.alloca via pragma(LLVM_internal, "alloca").
Added support for array .sort and .reverse properties.
Fixed some bugs with pointer arithmetic.
Disabled some DMD AST optimizations that was messing things up, destroying valuable information.
Added a KDevelop project file, this is what I use for coding LLVMDC now :)
Other minor stuff.
author | lindquist |
---|---|
date | Mon, 12 Nov 2007 06:32:46 +0100 |
parents | 70d6113eeb8c |
children | ce7ed8f59b99 |
line wrap: on
line diff
--- a/gen/tollvm.h Thu Nov 08 19:21:05 2007 +0100 +++ b/gen/tollvm.h Mon Nov 12 06:32:46 2007 +0100 @@ -34,7 +34,7 @@ void DtoInitClass(TypeClass* tc, llvm::Value* dst); llvm::Constant* DtoConstInitializer(Type* type, Initializer* init); -DValue* DtoInitializer(Initializer* init, DValue* v); +DValue* DtoInitializer(Initializer* init); llvm::Function* LLVM_DeclareMemSet32(); llvm::Function* LLVM_DeclareMemSet64(); @@ -49,7 +49,7 @@ llvm::Value* DtoRealloc(llvm::Value* ptr, const llvm::Type* ty); llvm::Value* DtoRealloc(llvm::Value* ptr, llvm::Value* len); -void DtoAssert(llvm::Value* cond, llvm::Value* loc, llvm::Value* msg); +void DtoAssert(llvm::Value* cond, Loc* loc, DValue* msg); llvm::Value* DtoArgument(const llvm::Type* paramtype, Argument* fnarg, Expression* argexp); @@ -75,6 +75,13 @@ void DtoStore(llvm::Value* src, llvm::Value* dst); llvm::Value* DtoBitCast(llvm::Value* v, const llvm::Type* t); +// llvm::dyn_cast wrappers +const llvm::PointerType* isaPointer(llvm::Value* v); +const llvm::ArrayType* isaArray(llvm::Value* v); +const llvm::StructType* isaStruct(llvm::Value* v); +llvm::Constant* isaConstant(llvm::Value* v); +llvm::ConstantInt* isaConstantInt(llvm::Value* v); + // basic operations void DtoAssign(DValue* lhs, DValue* rhs);