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:
parent
e2e2a631bf
commit
f1cbb93050
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue