[PATCH] D47024: [MathExtras] Add alignToPowerOf2
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 17 12:55:22 PDT 2018
MaskRay added a comment.
They may be applicable in some places of LLD, e.g.
https://github.com/llvm-mirror/lld/tree/master/ELF/SyntheticSections.cpp#L487
void EhFrameSection::finalizeContents() {
...
for (CieRecord *Rec : CieRecords) {
...
Off += alignTo(Rec->Cie->Size, Config->Wordsize);
https://github.com/llvm-mirror/lld/tree/master/ELF/SyntheticSections.cpp#L2536
void MergeNoTailSection::finalizeContents() {
...
for (size_t I = 0; I < NumShards; ++I) {
...
Off = alignTo(Off, Alignment);
ShardOffsets[I] = Off;
Repository:
rL LLVM
https://reviews.llvm.org/D47024
More information about the llvm-commits
mailing list