[lld] r222293 - Fix MSVC warning.
Rui Ueyama
ruiu at google.com
Tue Nov 18 16:48:06 PST 2014
Author: ruiu
Date: Tue Nov 18 18:48:06 2014
New Revision: 222293
URL: http://llvm.org/viewvc/llvm-project?rev=222293&view=rev
Log:
Fix MSVC warning.
This patch fixes the following MSVC warning.
warning C4334: '<<' : result of 32-bit shift implicitly
converted to 64 bits (was 64-bit shift intended?)
Modified:
lld/trunk/lib/ReaderWriter/MachO/File.h
Modified: lld/trunk/lib/ReaderWriter/MachO/File.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/File.h?rev=222293&r1=222292&r2=222293&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/File.h (original)
+++ lld/trunk/lib/ReaderWriter/MachO/File.h Tue Nov 18 18:48:06 2014
@@ -39,8 +39,9 @@ public:
name = name.copy(_allocator);
content = content.copy(_allocator);
}
- DefinedAtom::Alignment align(inSection->alignment,
- sectionOffset % (1 << inSection->alignment));
+ DefinedAtom::Alignment align(
+ inSection->alignment,
+ sectionOffset % ((uint64_t)1 << inSection->alignment));
MachODefinedAtom *atom =
new (_allocator) MachODefinedAtom(*this, name, scope, type, merge,
thumb, noDeadStrip, content, align);
@@ -61,8 +62,9 @@ public:
content = content.copy(_allocator);
sectionName = sectionName.copy(_allocator);
}
- DefinedAtom::Alignment align(inSection->alignment,
- sectionOffset % (1 << inSection->alignment));
+ DefinedAtom::Alignment align(
+ inSection->alignment,
+ sectionOffset % ((uint64_t)1 << inSection->alignment));
MachODefinedCustomSectionAtom *atom =
new (_allocator) MachODefinedCustomSectionAtom(*this, name, scope, type,
merge, thumb,
@@ -79,8 +81,9 @@ public:
// Make a copy of the atom's name and content that is owned by this file.
name = name.copy(_allocator);
}
- DefinedAtom::Alignment align(inSection->alignment,
- sectionOffset % (1 << inSection->alignment));
+ DefinedAtom::Alignment align(
+ inSection->alignment,
+ sectionOffset % ((uint64_t)1 << inSection->alignment));
MachODefinedAtom *atom =
new (_allocator) MachODefinedAtom(*this, name, scope, size, noDeadStrip,
align);
More information about the llvm-commits
mailing list