Mercurial > projects > ldc
diff gen/llvmhelpers.h @ 1350:15e9762bb620
Adds explicit alignment information for alloca instructions in general, there's a few cases that still needs to be looked at but this should catch the majority. Fixes ticket #293 .
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Thu, 14 May 2009 13:26:40 +0200 |
parents | 0686701178d3 |
children | 8d501abecd24 |
line wrap: on
line diff
--- a/gen/llvmhelpers.h Wed May 13 18:08:40 2009 +0200 +++ b/gen/llvmhelpers.h Thu May 14 13:26:40 2009 +0200 @@ -40,8 +40,9 @@ void DtoDeleteArray(DValue* arr); // emit an alloca -llvm::AllocaInst* DtoAlloca(const LLType* lltype, const std::string& name = ""); -llvm::AllocaInst* DtoAlloca(const LLType* lltype, LLValue* arraysize, const std::string& name = ""); +llvm::AllocaInst* DtoAlloca(Type* type, const char* name = ""); +llvm::AllocaInst* DtoArrayAlloca(Type* type, unsigned arraysize, const char* name = ""); +llvm::AllocaInst* DtoRawAlloca(const llvm::Type* lltype, size_t alignment, const char* name = ""); // assertion generator void DtoAssert(Module* M, Loc loc, DValue* msg);