Fix build breakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201805 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rui Ueyama 2014-02-20 19:32:00 +00:00
parent f41901d32c
commit fb4b4c166e

View File

@ -384,7 +384,8 @@ error_code COFFObjectFile::initSymbolTablePtr() {
// Returns the file offset for the given VA.
error_code COFFObjectFile::getVaPtr(uint64_t Addr, uintptr_t &Res) const {
uint64_t ImageBase = PE32Header ? PE32Header->ImageBase : PE32PlusHeader->ImageBase;
uint64_t ImageBase = PE32Header ? (uint64_t)PE32Header->ImageBase
: (uint64_t)PE32PlusHeader->ImageBase;
uint64_t Rva = Addr - ImageBase;
assert(Rva <= UINT32_MAX);
return getRvaPtr((uint32_t)Rva, Res);