[llvm] [TableGen] Use std::array::fill instead of std::memset. NFC (PR #169204)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 23 00:35:59 PST 2025
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/169204
None
>From da77ccb79eb2128d3d7eced024ef24212b0196c6 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Sun, 23 Nov 2025 00:35:13 -0800
Subject: [PATCH] [TableGen] Use std::array::fill instead of std::memset. NFC
---
llvm/utils/TableGen/Common/CodeGenDAGPatterns.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h
index 2cd7ec1521feb..8146f54cd3db5 100644
--- a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h
+++ b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h
@@ -71,7 +71,7 @@ struct MachineValueTypeSet {
return Count;
}
LLVM_ATTRIBUTE_ALWAYS_INLINE
- void clear() { std::memset(Words.data(), 0, NumWords * sizeof(WordType)); }
+ void clear() { Words.fill(0); }
LLVM_ATTRIBUTE_ALWAYS_INLINE
bool empty() const {
for (WordType W : Words)
More information about the llvm-commits
mailing list