diff options
-rw-r--r-- | llvm/include/llvm/Support/Allocator.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/Allocator.h b/llvm/include/llvm/Support/Allocator.h index 9ca02efb1f6..4a04ccc382e 100644 --- a/llvm/include/llvm/Support/Allocator.h +++ b/llvm/include/llvm/Support/Allocator.h @@ -77,7 +77,7 @@ public: template <typename T> T *Allocate(size_t Num, unsigned Alignment) { // Round EltSize up to the specified alignment. - unsigned EltSize = (sizeof(T)+Alignment-1)&~Alignment; + unsigned EltSize = (sizeof(T)+Alignment-1)&(-Alignment); return static_cast<T*>(Allocate(Num * EltSize, Alignment)); } |