comparison gen/functions.cpp @ 435:74101be2a553

Added type param to DVarValue as DMD sometimes overrides the type of the VarDeclaration. Added support for align(1)/packed structs, other alignments are still ignored. Fixed some problems with accessing lazy arguments.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Wed, 30 Jul 2008 10:12:55 +0200
parents 8b7cee241e91
children 44f08170f4ef
comparison
equal deleted inserted replaced
433:b5f55f471e0b 435:74101be2a553
20 #include "gen/classes.h" 20 #include "gen/classes.h"
21 #include "gen/dvalue.h" 21 #include "gen/dvalue.h"
22 22
23 const llvm::FunctionType* DtoFunctionType(Type* type, const LLType* thistype, bool ismain) 23 const llvm::FunctionType* DtoFunctionType(Type* type, const LLType* thistype, bool ismain)
24 { 24 {
25 assert(type->ty == Tfunction);
25 TypeFunction* f = (TypeFunction*)type; 26 TypeFunction* f = (TypeFunction*)type;
26 assert(f != 0);
27 27
28 if (type->ir.type != NULL) { 28 if (type->ir.type != NULL) {
29 return llvm::cast<llvm::FunctionType>(type->ir.type->get()); 29 return llvm::cast<llvm::FunctionType>(type->ir.type->get());
30 } 30 }
31 31