diff options
author | Mon P Wang <wangmp@apple.com> | 2009-03-10 23:04:40 +0000 |
---|---|---|
committer | Mon P Wang <wangmp@apple.com> | 2009-03-10 23:04:40 +0000 |
commit | cc51b03a4e97a3da2832132a0496cc5d97638c89 (patch) | |
tree | ede6104cf748e73f26bd923142565eea20febf68 | |
parent | 19393b00643ed152dcabc10040933783e24c7c34 (diff) | |
download | bcm5719-llvm-cc51b03a4e97a3da2832132a0496cc5d97638c89.tar.gz bcm5719-llvm-cc51b03a4e97a3da2832132a0496cc5d97638c89.zip |
Fixed rounding up EltSize
llvm-svn: 66594
-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)); } |