Fix struct alignment padding type selection

GitHub: Fixes #944.
This commit is contained in:
David Nadlinger 2015-05-29 00:22:21 +02:00
parent 014627d6a6
commit c65faeabaf
2 changed files with 2 additions and 2 deletions

View file

@ -27,7 +27,7 @@
static bool isAligned(llvm::Type* type, size_t offset)
{
return gDataLayout->getABITypeAlignment(type) % offset == 0;
return (offset % gDataLayout->getABITypeAlignment(type)) == 0;
}
size_t add_zeros(std::vector<llvm::Type*>& defaultTypes,

@ -1 +1 @@
Subproject commit 627b3a7aba4b7511e800f3384ed2f75b20c2ec4c
Subproject commit 6e19a33c1eba44443c175faa55f9750c32768e20