mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 00:23:14 +01:00
Added missing new files.
This commit is contained in:
34
ir/ir.cpp
Normal file
34
ir/ir.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user