OSDN Git Service

Fix MSVC build failure introduced in r291431
authorPavel Labath <labath@google.com>
Mon, 9 Jan 2017 11:20:35 +0000 (11:20 +0000)
committerPavel Labath <labath@google.com>
Mon, 9 Jan 2017 11:20:35 +0000 (11:20 +0000)
MSVC does not like to reinterpret_cast to a uint64_t. Use a different cast
instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291435 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp

index 953d4cb..8f6b184 100644 (file)
@@ -917,12 +917,11 @@ bool RuntimeDyldELF::resolveAArch64ShortBranch(
       return false;
 
     const auto &SymInfo = Loc->second;
-    Address = reinterpret_cast<uint64_t>(
-        Sections[SymInfo.getSectionID()].getLoadAddressWithOffset(
+    Address =
+        uint64_t(Sections[SymInfo.getSectionID()].getLoadAddressWithOffset(
             SymInfo.getOffset()));
   } else {
-    Address =
-        reinterpret_cast<uint64_t>(Sections[Value.SectionID].getLoadAddress());
+    Address = uint64_t(Sections[Value.SectionID].getLoadAddress());
   }
   uint64_t Offset = RelI->getOffset();
   uint64_t SourceAddress = Sections[SectionID].getLoadAddressWithOffset(Offset);