[llvm] 95e5a99 - [Bitcode] Get rid of compiler message (#113428)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 23 08:40:06 PDT 2024
Author: Serge Pavlov
Date: 2024-10-23T22:40:02+07:00
New Revision: 95e5a999ab8f2a8f163899c6ab445baf901c3c96
URL: https://github.com/llvm/llvm-project/commit/95e5a999ab8f2a8f163899c6ab445baf901c3c96
DIFF: https://github.com/llvm/llvm-project/commit/95e5a999ab8f2a8f163899c6ab445baf901c3c96.diff
LOG: [Bitcode] Get rid of compiler message (#113428)
Insert explicit cast from an enumerator to unsigned int, because some
compilers issue a warning on signed vs unsigned comparison, see:
https://github.com/llvm/llvm-project/pull/110805#issuecomment-2411095723.
Added:
Modified:
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 5a6fb5064b3166..4aea059551dedc 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -798,7 +798,7 @@ class BitcodeReader : public BitcodeReaderBase, public GVMaterializer {
if (Slot == Record.size())
return true;
unsigned ValID = Record[Slot++];
- if (ValID != bitc::OB_METADATA) {
+ if (ValID != static_cast<unsigned>(bitc::OB_METADATA)) {
unsigned TypeId;
return getValueTypePair(Record, --Slot, InstNum, ResVal, TypeId,
ConstExprInsertBB);
More information about the llvm-commits
mailing list