[ORC] Add more explicit narrowing casts.
authorLang Hames <lhames@gmail.com>
Tue, 12 Oct 2021 04:59:22 +0000 (21:59 -0700)
committerLang Hames <lhames@gmail.com>
Tue, 12 Oct 2021 05:00:06 +0000 (22:00 -0700)
This should fix the buildbot failure at
https://lab.llvm.org/buildbot/#/builders/187/builds/2140

llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp

index 948d1d9..a08f29c 100644 (file)
@@ -359,7 +359,7 @@ EPCIndirectionUtils::getIndirectStubs(unsigned NumStubs) {
     auto Alloc = SimpleSegmentAlloc::Create(
         EPC.getMemMgr(), nullptr,
         {{StubProt, {static_cast<size_t>(StubBytes), Align(PageSize)}},
-         {PtrProt, {PtrBytes, Align(PageSize)}}});
+         {PtrProt, {static_cast<size_t>(PtrBytes), Align(PageSize)}}});
 
     if (!Alloc)
       return Alloc.takeError();