Mercurial > projects > ldc
view ir/ir.cpp @ 1276:fa20726fe074
Update codegen to (hopefully) work correctly with newer LLVM trunk, where
there's no longer a Fast flag. (It has been replaced by an optimization level)
Untested because I haven't compiled that recent an LLVM yet :).
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Wed, 29 Apr 2009 10:26:28 +0200 |
parents | 2a687353c84d |
children |
line wrap: on
line source
#include "llvm/Target/TargetData.h" #include "gen/irstate.h" #include "gen/tollvm.h" #include "gen/functions.h" #include "ir/ir.h" #include "ir/irfunction.h" unsigned GetTypeAlignment(Ir* ir, Type* t) { return gTargetData->getABITypeAlignment(DtoType(t)); } Ir::Ir() : irs(NULL) { } void Ir::addFunctionBody(IrFunction * f) { functionbodies.push_back(f); } void Ir::emitFunctionBodies() { while (!functionbodies.empty()) { IrFunction* irf = functionbodies.front(); functionbodies.pop_front(); DtoDefineFunction(irf->decl); } }