[llvm] d9a9962 - [GSYM] Silence cast warning (#191561)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 04:16:06 PDT 2026


Author: Alexandre Ganea
Date: 2026-04-13T07:16:01-04:00
New Revision: d9a9962aa52b7a7cc251babba5d19f8adcd70ff3

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

LOG: [GSYM] Silence cast warning (#191561)

Previously clang-cl was generating "warning: comparison of integers of
different signs".

Added: 
    

Modified: 
    llvm/lib/DebugInfo/GSYM/GsymCreator.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp b/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
index 399587587a679..b511dc01cfed4 100644
--- a/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
+++ b/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
@@ -171,7 +171,7 @@ llvm::Error GsymCreator::encode(FileWriter &O) const {
 
   // Verify that the size of the string table does not exceed 32-bit max.
   // This means the offsets in the string table will not exceed 32-bit max.
-  if (StrtabSize > UINT32_MAX) {
+  if (static_cast<uint64_t>(StrtabSize) > UINT32_MAX) {
     return createStringError(std::errc::invalid_argument,
                              "string table size exceeded 32-bit max");
   }


        


More information about the llvm-commits mailing list