[llvm] 452a2c6 - [llvm] Silence warning when compiling with MSVC targetting x86
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 06:34:34 PST 2024
Author: Alexandre Ganea
Date: 2024-01-25T09:34:18-05:00
New Revision: 452a2c6e3575d56a34c34472b9f829cb17e2b564
URL: https://github.com/llvm/llvm-project/commit/452a2c6e3575d56a34c34472b9f829cb17e2b564
DIFF: https://github.com/llvm/llvm-project/commit/452a2c6e3575d56a34c34472b9f829cb17e2b564.diff
LOG: [llvm] Silence warning when compiling with MSVC targetting x86
This fixes:
```
[1614/6998] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\MachOPlatform.cpp.obj
C:\git\llvm-project\llvm\include\llvm/ExecutionEngine/Orc/MachOBuilder.h(367): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
```
Added:
Modified:
llvm/include/llvm/ExecutionEngine/Orc/MachOBuilder.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/MachOBuilder.h b/llvm/include/llvm/ExecutionEngine/Orc/MachOBuilder.h
index 45dd5fcbebd794a..9a011a427db3b74 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/MachOBuilder.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/MachOBuilder.h
@@ -364,7 +364,7 @@ template <typename MachOTraits> class MachOBuilder {
Seg.vmaddr = SegVMAddr;
Seg.fileoff = Offset;
for (auto &Sec : Seg.Sections) {
- Offset = alignTo(Offset, size_t{1} << Sec->align);
+ Offset = alignTo(Offset, 1ULL << Sec->align);
if (Sec->Content.Size)
Sec->offset = Offset;
Sec->size = Sec->Content.Size;
More information about the llvm-commits
mailing list