[llvm] [llvm] Use llvm::fill instead of std::fill(NFC) (PR #146911)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 08:24:04 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- llvm/include/llvm/ADT/BitVector.h llvm/include/llvm/ADT/Bitset.h llvm/include/llvm/CodeGen/TargetLowering.h llvm/include/llvm/TargetParser/SubtargetFeature.h llvm/lib/CodeGen/MachineLICM.cpp llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/lib/CodeGen/TargetLoweringBase.cpp llvm/lib/ExecutionEngine/ExecutionEngine.cpp llvm/lib/Transforms/Scalar/LoopDeletion.cpp llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp llvm/lib/Transforms/Utils/LoopUtils.cpp llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp llvm/tools/llvm-mca/Views/BottleneckAnalysis.cpp llvm/tools/llvm-mca/Views/RegisterFileStatistics.cpp llvm/tools/llvm-mca/Views/TimelineView.cpp llvm/unittests/Support/ParallelTest.cpp llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/ADT/BitVector.h b/llvm/include/llvm/ADT/BitVector.h
index e66c6ea89..70de4c239 100644
--- a/llvm/include/llvm/ADT/BitVector.h
+++ b/llvm/include/llvm/ADT/BitVector.h
@@ -795,9 +795,7 @@ private:
set_unused_bits(false);
}
- void init_words(bool t) {
- llvm::fill(Bits, 0 - (BitWord)t);
- }
+ void init_words(bool t) { llvm::fill(Bits, 0 - (BitWord)t); }
template<bool AddBits, bool InvertMask>
void applyMask(const uint32_t *Mask, unsigned MaskWords) {
diff --git a/llvm/include/llvm/CodeGen/TargetLowering.h b/llvm/include/llvm/CodeGen/TargetLowering.h
index ef39be1fc..b07937c11 100644
--- a/llvm/include/llvm/CodeGen/TargetLowering.h
+++ b/llvm/include/llvm/CodeGen/TargetLowering.h
@@ -1116,9 +1116,7 @@ public:
LegalizeTypeAction ValueTypeActions[MVT::VALUETYPE_SIZE];
public:
- ValueTypeActionImpl() {
- llvm::fill(ValueTypeActions, TypeLegal);
- }
+ ValueTypeActionImpl() { llvm::fill(ValueTypeActions, TypeLegal); }
LegalizeTypeAction getTypeAction(MVT VT) const {
return ValueTypeActions[VT.SimpleTy];
``````````
</details>
https://github.com/llvm/llvm-project/pull/146911
More information about the llvm-commits
mailing list