[llvm] 26fc07d - [ORC] Add explicit narrowing casts to fix build errors.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 15:55:04 PST 2025


Author: Lang Hames
Date: 2025-01-23T23:54:57Z
New Revision: 26fc07d5d88760ad659599184fd10181287d2d9e

URL: https://github.com/llvm/llvm-project/commit/26fc07d5d88760ad659599184fd10181287d2d9e
DIFF: https://github.com/llvm/llvm-project/commit/26fc07d5d88760ad659599184fd10181287d2d9e.diff

LOG: [ORC] Add explicit narrowing casts to fix build errors.

This should fix the compile errors seen in
https://lab.llvm.org/buildbot/#/builders/154/builds/10779.

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp
index 28cbd45e3d082d..68bba9520c19fe 100644
--- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp
@@ -146,8 +146,11 @@ Error UnwindInfoManager::registerSections(
   std::lock_guard<std::mutex> Lock(M);
   for (auto &R : CodeRanges)
     UWSecs[R.Start.getValue()] = UnwindSections{
-        DSOBase.getValue(), DWARFEHFrame.Start.getValue(), DWARFEHFrame.size(),
-        CompactUnwind.Start.getValue(), CompactUnwind.size()};
+        static_cast<uintptr_t>(DSOBase.getValue()),
+        static_cast<uintptr_t>(DWARFEHFrame.Start.getValue()),
+        static_cast<size_t>(DWARFEHFrame.size()),
+        static_cast<uintptr_t>(CompactUnwind.Start.getValue()),
+        static_cast<size_t>(CompactUnwind.size())};
   return Error::success();
 }
 


        


More information about the llvm-commits mailing list