mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-15 00:21:50 +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:
@@ -1114,7 +1114,7 @@ void DtoVarDeclaration(VarDeclaration* vd)
|
||||
LLType* lltype = DtoType(type);
|
||||
|
||||
llvm::Value* allocainst;
|
||||
if(gTargetData->getTypeSizeInBits(lltype) == 0)
|
||||
if(gDataLayout->getTypeSizeInBits(lltype) == 0)
|
||||
allocainst = llvm::ConstantPointerNull::get(getPtrToType(lltype));
|
||||
else
|
||||
allocainst = DtoAlloca(type, vd->toChars());
|
||||
@@ -1595,7 +1595,7 @@ void DtoOverloadedIntrinsicName(TemplateInstance* ti, TemplateDeclaration* td, s
|
||||
}
|
||||
|
||||
char tmp[21]; // probably excessive, but covers a uint64_t
|
||||
sprintf(tmp, "%lu", static_cast<unsigned long>(gTargetData->getTypeSizeInBits(DtoType(T))));
|
||||
sprintf(tmp, "%lu", static_cast<unsigned long>(gDataLayout->getTypeSizeInBits(DtoType(T))));
|
||||
|
||||
// replace # in name with bitsize
|
||||
name = td->intrinsicName;
|
||||
@@ -1770,7 +1770,7 @@ size_t realignOffset(size_t offset, Type* type)
|
||||
}
|
||||
|
||||
// then we check against the llvm alignment
|
||||
size_t alignsize2 = gTargetData->getABITypeAlignment(T);
|
||||
size_t alignsize2 = gDataLayout->getABITypeAlignment(T);
|
||||
|
||||
// if it differs we need to insert manual padding as well
|
||||
if (alignsize != alignsize2)
|
||||
|
||||
Reference in New Issue
Block a user