Mercurial > projects > ldc
view ir/ir.cpp @ 1471:230765fc82f4
Emit nicer error messages when the user didn't set LLVM_REV and autodetection
didn't find a suitable revision or when the LLVM revision in use is too old.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Wed, 03 Jun 2009 16:09:48 +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); } }