OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20cb462
)
Fixed rounding up EltSize
author
Mon P Wang
<wangmp@apple.com>
Tue, 10 Mar 2009 23:04:40 +0000
(23:04 +0000)
committer
Mon P Wang
<wangmp@apple.com>
Tue, 10 Mar 2009 23:04:40 +0000
(23:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66594
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/Allocator.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/Allocator.h
b/include/llvm/Support/Allocator.h
index
9ca02ef
..
4a04ccc
100644
(file)
--- a/
include/llvm/Support/Allocator.h
+++ b/
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));
}