[llvm] 121302a - [ORC] Add explicit cast to fix a narrowing conversion error.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 15:33:14 PDT 2020


Author: Lang Hames
Date: 2020-07-16T15:33:02-07:00
New Revision: 121302ac6286c79aed5625b9e17ae907ed25f71d

URL: https://github.com/llvm/llvm-project/commit/121302ac6286c79aed5625b9e17ae907ed25f71d
DIFF: https://github.com/llvm/llvm-project/commit/121302ac6286c79aed5625b9e17ae907ed25f71d.diff

LOG: [ORC] Add explicit cast to fix a narrowing conversion error.

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp
index 51e6928c39e0..e7e1ff95e33a 100644
--- a/llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp
@@ -378,7 +378,7 @@ TPCIndirectionUtils::getIndirectStubs(unsigned NumStubs) {
                                                   sys::Memory::MF_WRITE);
 
     auto Alloc = TPC.getMemMgr().allocate(
-        {{StubPagePermissions, {PageSize, StubBytes, 0}},
+        {{StubPagePermissions, {PageSize, static_cast<size_t>(StubBytes), 0}},
          {PointerPagePermissions, {PageSize, 0, PointerBytes}}});
 
     if (!Alloc)


        


More information about the llvm-commits mailing list