Use RoundUpToAlignment instead of writing the expression to round up.

The original code might be more readable than the new one if you
remember the expression. Otherwise the new one is probably better.

llvm-svn: 256995
This commit is contained in:
Rui Ueyama 2016-01-06 23:34:12 +00:00
parent e2e2a631bf
commit f1cbb93050
1 changed files with 1 additions and 1 deletions

View File

@ -433,7 +433,7 @@ private:
};
inline uint64_t align(uint64_t Value, uint64_t Align) {
return (Value + Align - 1) & ~(Align - 1);
return llvm::RoundUpToAlignment(Value, Align);
}
// All output sections that are hadnled by the linker specially are