[llvm] [NFC][IR2Vec] Fix warnings on MSVC compilation (PR #148911)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 10:52:14 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-analysis
Author: S. VenkataKeerthy (svkeerthy)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/148911.diff
1 Files Affected:
- (modified) llvm/lib/Analysis/IR2Vec.cpp (+4-3)
``````````diff
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;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/148911
More information about the llvm-commits
mailing list