From: Davide Italiano Date: Fri, 11 Nov 2016 03:07:45 +0000 (+0000) Subject: [lli] Simplify the code a bit. No functional change intended. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88b31bfeb1dbafaec398782791510ecbb74478a7;p=llvm [lli] Simplify the code a bit. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286555 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index c95037f4540..243f1aec6b5 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/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 COFFObjectFile::getSymbolAddress(DataRefImpl Ref) const {