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?)

llvm-svn: 222293
This commit is contained in:
Rui Ueyama 2014-11-19 00:48:06 +00:00
parent 7a2d15678e
commit 81b73f3020
1 changed files with 9 additions and 6 deletions

View File

@ -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);