[llvm] 1549be3 - Silence an implicit conversion warning on the bit shift result in MSVC; NFC

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 5 04:13:54 PDT 2021


Author: Aaron Ballman
Date: 2021-10-05T07:13:47-04:00
New Revision: 1549be3e820f38f02484c5d990e12749d8121ba3

URL: https://github.com/llvm/llvm-project/commit/1549be3e820f38f02484c5d990e12749d8121ba3
DIFF: https://github.com/llvm/llvm-project/commit/1549be3e820f38f02484c5d990e12749d8121ba3.diff

LOG: Silence an implicit conversion warning on the bit shift result in MSVC; NFC

Added: 
    

Modified: 
    llvm/lib/Object/XCOFFObjectFile.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp
index c915bf703c7af..e4daa8cceecaa 100644
--- a/llvm/lib/Object/XCOFFObjectFile.cpp
+++ b/llvm/lib/Object/XCOFFObjectFile.cpp
@@ -230,7 +230,7 @@ uint32_t XCOFFObjectFile::getSymbolAlignment(DataRefImpl Symb) const {
       // TODO: report the error up the stack.
       consumeError(CsectAuxRefOrError.takeError());
     else
-      Result = 1 << CsectAuxRefOrError.get().getAlignmentLog2();
+      Result = 1ULL << CsectAuxRefOrError.get().getAlignmentLog2();
   }
   return Result;
 }


        


More information about the llvm-commits mailing list