projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e32734
)
[lli] Simplify the code a bit. No functional change intended.
author
Davide Italiano
<davide@freebsd.org>
Fri, 11 Nov 2016 03:07:45 +0000
(
03:07
+0000)
committer
Davide Italiano
<davide@freebsd.org>
Fri, 11 Nov 2016 03:07:45 +0000
(
03:07
+0000)
llvm-svn: 286555
llvm/lib/Object/COFFObjectFile.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Object/COFFObjectFile.cpp
b/llvm/lib/Object/COFFObjectFile.cpp
index
c95037f
..
243f1ae
100644
(file)
--- a/
llvm/lib/Object/COFFObjectFile.cpp
+++ b/
llvm/lib/Object/COFFObjectFile.cpp
@@
-161,9
+161,7
@@
uint32_t COFFObjectFile::getSymbolAlignment(DataRefImpl Ref) const {
// MSVC/link.exe seems to align symbols to the next-power-of-2
// up to 32 bytes.
COFFSymbolRef Symb = getCOFFSymbol(Ref);
- uint32_t Value = Symb.getValue();
- return std::min(uint64_t(32),
- isPowerOf2_64(Value) ? Value : NextPowerOf2(Value));
+ return std::min(uint64_t(32), PowerOf2Ceil(Symb.getValue()));
}
Expected<uint64_t> COFFObjectFile::getSymbolAddress(DataRefImpl Ref) const {