Skip to content

Commit 0b939de

Browse files
committed
[LLD][MachO] Fix warning when building with latest MSVC
This fixes: ``` [3902/4335] Building CXX object tools\lld\MachO\CMakeFiles\lldMachO.dir\Arch\X86_64.cpp.obj C:\git\llvm-project\lld\MachO\Arch\X86_64.cpp(107): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) ```
1 parent 66b69d5 commit 0b939de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lld/MachO/Arch/X86_64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ int64_t X86_64::getEmbeddedAddend(MemoryBufferRef mb, uint64_t offset,
104104
void X86_64::relocateOne(uint8_t *loc, const Reloc &r, uint64_t value,
105105
uint64_t relocVA) const {
106106
if (r.pcrel) {
107-
uint64_t pc = relocVA + (1 << r.length) + pcrelOffset(r.type);
107+
uint64_t pc = relocVA + (1ull << r.length) + pcrelOffset(r.type);
108108
value -= pc;
109109
}
110110

0 commit comments

Comments
 (0)