Mercurial > projects > ldc
view ir/ir.cpp @ 1281:29d3861aa2da
Make sure this still compiles after LLVM r70437, which introduces a
specialization for command-line option template parser<char> which does the
wrong thing for us...
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Thu, 30 Apr 2009 12:25:04 +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); } }