[llvm] r201805 - Fix build breakage.

Rui Ueyama ruiu at google.com
Thu Feb 20 11:32:01 PST 2014


Author: ruiu
Date: Thu Feb 20 13:32:00 2014
New Revision: 201805

URL: http://llvm.org/viewvc/llvm-project?rev=201805&view=rev
Log:
Fix build breakage.

Modified:
    llvm/trunk/lib/Object/COFFObjectFile.cpp

Modified: llvm/trunk/lib/Object/COFFObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/COFFObjectFile.cpp?rev=201805&r1=201804&r2=201805&view=diff
==============================================================================
--- llvm/trunk/lib/Object/COFFObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/COFFObjectFile.cpp Thu Feb 20 13:32:00 2014
@@ -384,7 +384,8 @@ error_code COFFObjectFile::initSymbolTab
 
 // 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);





More information about the llvm-commits mailing list