[PATCH] D121752: [Debuginfod] Fix overflow warning on 32-bit hosts.

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 16:21:05 PDT 2022


mysterymath updated this revision to Diff 415624.
mysterymath added a comment.

Update tag.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121752/new/

https://reviews.llvm.org/D121752

Files:
  llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h


Index: llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
===================================================================
--- llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
+++ llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
@@ -62,9 +62,10 @@
     std::string FallbackDebugPath;
     std::string DWPName;
     std::vector<std::string> DebugFileDirectory;
-    size_t MaxCacheSize = sizeof(size_t) == 4
-                              ? 512 * 1024 * 1024 /* 512 MiB */
-                              : 4ULL * 1024 * 1024 * 1024 /* 4 GiB */;
+    size_t MaxCacheSize =
+        sizeof(size_t) == 4
+            ? 512 * 1024 * 1024 /* 512 MiB */
+            : static_cast<size_t>(4ULL * 1024 * 1024 * 1024) /* 4 GiB */;
   };
 
   LLVMSymbolizer();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121752.415624.patch
Type: text/x-patch
Size: 755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220315/27147ade/attachment.bin>


More information about the llvm-commits mailing list