mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-12 13:55:57 +03:00
LLVM 3.9: llvm::RoundUpToAlignment() renamed to llvm::alignTo()
This commit is contained in:
parent
6290758f21
commit
9d7e247092
1 changed files with 8 additions and 2 deletions
|
@ -42,8 +42,14 @@ RTTIBuilder::RTTIBuilder(AggregateDeclaration *base_class) {
|
|||
void RTTIBuilder::push(llvm::Constant *C) {
|
||||
// We need to explicitly zero any padding bytes as per TDPL §7.1.1 (and
|
||||
// also match the struct type lowering code here).
|
||||
const uint64_t fieldStart = llvm::RoundUpToAlignment(
|
||||
prevFieldEnd, gDataLayout->getABITypeAlignment(C->getType()));
|
||||
const uint64_t fieldStart =
|
||||
#if LDC_LLVM_VER >= 309
|
||||
llvm::alignTo
|
||||
#else
|
||||
llvm::RoundUpToAlignment
|
||||
#endif
|
||||
(prevFieldEnd, gDataLayout->getABITypeAlignment(C->getType()));
|
||||
|
||||
const uint64_t paddingBytes = fieldStart - prevFieldEnd;
|
||||
if (paddingBytes) {
|
||||
llvm::Type *const padding = llvm::ArrayType::get(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue