[llvm] fad0fbc - [NFC][IR2Vec] Fix warnings on MSVC compilation (#148911)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 10:54:03 PDT 2025
Author: S. VenkataKeerthy
Date: 2025-07-15T10:54:00-07:00
New Revision: fad0fbc9371c6a3289e6dc8a5018cc00733be14f
URL: https://github.com/llvm/llvm-project/commit/fad0fbc9371c6a3289e6dc8a5018cc00733be14f
DIFF: https://github.com/llvm/llvm-project/commit/fad0fbc9371c6a3289e6dc8a5018cc00733be14f.diff
LOG: [NFC][IR2Vec] Fix warnings on MSVC compilation (#148911)
Added:
Modified:
llvm/lib/Analysis/IR2Vec.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/IR2Vec.cpp b/llvm/lib/Analysis/IR2Vec.cpp
index cfe0c566e2adc..898bf5b202feb 100644
--- a/llvm/lib/Analysis/IR2Vec.cpp
+++ b/llvm/lib/Analysis/IR2Vec.cpp
@@ -304,10 +304,11 @@ Vocabulary::VocabVector Vocabulary::createDummyVocabForTest(unsigned Dim) {
float DummyVal = 0.1f;
// Create a dummy vocabulary with entries for all opcodes, types, and
// operand
- for (unsigned _ : seq(0u, Vocabulary::MaxOpcodes + Vocabulary::MaxTypeIDs +
- Vocabulary::MaxOperandKinds)) {
+ for ([[maybe_unused]] unsigned _ :
+ seq(0u, Vocabulary::MaxOpcodes + Vocabulary::MaxTypeIDs +
+ Vocabulary::MaxOperandKinds)) {
DummyVocab.push_back(Embedding(Dim, DummyVal));
- DummyVal += 0.1;
+ DummyVal += 0.1f;
}
return DummyVocab;
}
More information about the llvm-commits
mailing list