[llvm] r286555 - [lli] Simplify the code a bit. No functional change intended.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 19:07:45 PST 2016
Author: davide
Date: Thu Nov 10 21:07:45 2016
New Revision: 286555
URL: http://llvm.org/viewvc/llvm-project?rev=286555&view=rev
Log:
[lli] Simplify the code a bit. No functional change intended.
Modified:
llvm/trunk/lib/Object/COFFObjectFile.cpp
Modified: llvm/trunk/lib/Object/COFFObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/COFFObjectFile.cpp?rev=286555&r1=286554&r2=286555&view=diff
==============================================================================
--- llvm/trunk/lib/Object/COFFObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/COFFObjectFile.cpp Thu Nov 10 21:07:45 2016
@@ -161,9 +161,7 @@ uint32_t COFFObjectFile::getSymbolAlignm
// 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 {
More information about the llvm-commits
mailing list