mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 00:23:14 +01:00
Add changes for LLVM 3.2
- The Attributes class was changed again - TargetData was renamed to DataLayout Compiles again with LLVm 3.0, 3.1 and trunk(3.2).
This commit is contained in:
12
ir/ir.cpp
12
ir/ir.cpp
@@ -1,4 +1,8 @@
|
||||
#if LDC_LLVM_VER >= 302
|
||||
#include "llvm/DataLayout.h"
|
||||
#else
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#endif
|
||||
|
||||
#include "gen/irstate.h"
|
||||
#include "gen/tollvm.h"
|
||||
@@ -10,22 +14,22 @@
|
||||
|
||||
unsigned GetTypeAlignment(Ir* ir, Type* t)
|
||||
{
|
||||
return gTargetData->getABITypeAlignment(DtoType(t));
|
||||
return gDataLayout->getABITypeAlignment(DtoType(t));
|
||||
}
|
||||
|
||||
unsigned GetPointerSize(Ir* ir)
|
||||
{
|
||||
return gTargetData->getPointerSize();
|
||||
return gDataLayout->getPointerSize();
|
||||
}
|
||||
|
||||
unsigned GetTypeStoreSize(Ir* ir, Type* t)
|
||||
{
|
||||
return gTargetData->getTypeStoreSize(DtoType(t));
|
||||
return gDataLayout->getTypeStoreSize(DtoType(t));
|
||||
}
|
||||
|
||||
unsigned GetTypeAllocSize(Ir* ir, Type* t)
|
||||
{
|
||||
return gTargetData->getTypeAllocSize(DtoType(t));
|
||||
return gDataLayout->getTypeAllocSize(DtoType(t));
|
||||
}
|
||||
|
||||
Ir::Ir()
|
||||
|
||||
Reference in New Issue
Block a user