diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-21 18:18:06 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-21 18:18:06 +0000 |
commit | a796b6c4b99116ca31e6e61d8765b321678d580e (patch) | |
tree | 0f2fac9dd8de8d4a7203f9d8c999f30744e8caa6 /include/clang/Basic/OnDiskHashTable.h | |
parent | 83591b6d3f20ee84f4abe1c2574e90736aa84b11 (diff) |
Switch some realignment calculations over to llvm::RoundUpToAlignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162297 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/OnDiskHashTable.h')
-rw-r--r-- | include/clang/Basic/OnDiskHashTable.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/clang/Basic/OnDiskHashTable.h b/include/clang/Basic/OnDiskHashTable.h index 79273fcc79..66109e7b3c 100644 --- a/include/clang/Basic/OnDiskHashTable.h +++ b/include/clang/Basic/OnDiskHashTable.h @@ -65,8 +65,7 @@ inline void Emit64(raw_ostream& Out, uint64_t V) { inline void Pad(raw_ostream& Out, unsigned A) { Offset off = (Offset) Out.tell(); - uint32_t n = ((uintptr_t)(off+A-1) & ~(uintptr_t)(A-1)) - off; - for (; n ; --n) + for (uint32_t n = llvm::OffsetToAlignment(off, A); n; --n) Emit8(Out, 0); } |