[llvm] 061db17 - Fix MSVC "signed/unsigned mismatch" warning. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 05:45:06 PDT 2024
Author: Simon Pilgrim
Date: 2024-05-13T13:40:27+01:00
New Revision: 061db17a3075e34c55ebd463d06e16771e398e04
URL: https://github.com/llvm/llvm-project/commit/061db17a3075e34c55ebd463d06e16771e398e04
DIFF: https://github.com/llvm/llvm-project/commit/061db17a3075e34c55ebd463d06e16771e398e04.diff
LOG: Fix MSVC "signed/unsigned mismatch" warning. NFC.
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 6533e8281631a..1e33c2729e5d8 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -1650,7 +1650,8 @@ DIE &DwarfUnit::constructMemberDIE(DIE &Buffer, const DIDerivedType *DT) {
addUInt(MemberDie, dwarf::DW_AT_byte_size, std::nullopt, FieldSize / 8);
addUInt(MemberDie, dwarf::DW_AT_bit_size, std::nullopt, Size);
- assert(DT->getOffsetInBits() <= std::numeric_limits<int64_t>::max());
+ assert(DT->getOffsetInBits() <=
+ (uint64_t)std::numeric_limits<int64_t>::max());
int64_t Offset = DT->getOffsetInBits();
// We can't use DT->getAlignInBits() here: AlignInBits for member type
// is non-zero if and only if alignment was forced (e.g. _Alignas()),
More information about the llvm-commits
mailing list