comparison 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
comparison
equal deleted inserted replaced
1349:a376776e2301 1350:15e9762bb620
38 void DtoDeleteClass(LLValue* inst); 38 void DtoDeleteClass(LLValue* inst);
39 void DtoDeleteInterface(LLValue* inst); 39 void DtoDeleteInterface(LLValue* inst);
40 void DtoDeleteArray(DValue* arr); 40 void DtoDeleteArray(DValue* arr);
41 41
42 // emit an alloca 42 // emit an alloca
43 llvm::AllocaInst* DtoAlloca(const LLType* lltype, const std::string& name = ""); 43 llvm::AllocaInst* DtoAlloca(Type* type, const char* name = "");
44 llvm::AllocaInst* DtoAlloca(const LLType* lltype, LLValue* arraysize, const std::string& name = ""); 44 llvm::AllocaInst* DtoArrayAlloca(Type* type, unsigned arraysize, const char* name = "");
45 llvm::AllocaInst* DtoRawAlloca(const llvm::Type* lltype, size_t alignment, const char* name = "");
45 46
46 // assertion generator 47 // assertion generator
47 void DtoAssert(Module* M, Loc loc, DValue* msg); 48 void DtoAssert(Module* M, Loc loc, DValue* msg);
48 49
49 // return the LabelStatement from the current function with the given identifier or NULL if not found 50 // return the LabelStatement from the current function with the given identifier or NULL if not found