mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-17 17:29:02 +02:00
Use TargetData to get size of certain types (instead of hard-coded values).
This commit is contained in:
15
ir/ir.cpp
15
ir/ir.cpp
@@ -13,6 +13,21 @@ unsigned GetTypeAlignment(Ir* ir, Type* t)
|
||||
return gTargetData->getABITypeAlignment(DtoType(t));
|
||||
}
|
||||
|
||||
unsigned GetPointerSize(Ir* ir)
|
||||
{
|
||||
return gTargetData->getPointerSize();
|
||||
}
|
||||
|
||||
unsigned GetTypeStoreSize(Ir* ir, Type* t)
|
||||
{
|
||||
return gTargetData->getTypeStoreSize(DtoType(t));
|
||||
}
|
||||
|
||||
unsigned GetTypeAllocSize(Ir* ir, Type* t)
|
||||
{
|
||||
return gTargetData->getTypeAllocSize(DtoType(t));
|
||||
}
|
||||
|
||||
Ir::Ir()
|
||||
: irs(NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user