[lld] r181852 - [lld] Fix compiler warning that shift count is too big on P64.
Rui Ueyama
ruiu at google.com
Tue May 14 16:51:51 PDT 2013
Author: ruiu
Date: Tue May 14 18:51:50 2013
New Revision: 181852
URL: http://llvm.org/viewvc/llvm-project?rev=181852&view=rev
Log:
[lld] Fix compiler warning that shift count is too big on P64.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp?rev=181852&r1=181851&r2=181852&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp Tue May 14 18:51:50 2013
@@ -62,7 +62,7 @@ int reloc32(uint8_t *location, uint64_t
int reloc32_6_X(uint8_t *location, uint64_t P, uint64_t S, uint64_t A) {
int64_t result = ((S + A) >> 6);
- int64_t range = 1L << 32;
+ int64_t range = ((int64_t)1) << 32;
if (result > range)
return 1;
result = lld::scatterBits<int32_t>(result, 0xfff3fff);
More information about the llvm-commits
mailing list