Copy some clenaups from Eli to code that I copied. :-)

llvm-svn: 65286
This commit is contained in:
Mike Stump 2009-02-22 13:55:31 +00:00
parent 624497c29a
commit e8b2d066ea
1 changed files with 1 additions and 6 deletions

View File

@ -293,12 +293,7 @@ public:
}
uint64_t getBlockOffset(ValueDecl *D) {
uint64_t Size = getContext().getTypeSize(D->getType()) / 8;
unsigned Align = getContext().getTypeAlign(D->getType());
if (const AlignedAttr* AA = D->getAttr<AlignedAttr>())
Align = std::max(Align, AA->getAlignment());
return getBlockOffset(Size, Align);
return getBlockOffset(Size, getContext().getDeclAlignInBytes(D)*8);
}
std::map<Decl*, uint64_t> BlockDecls;