[llvm] 50eb5bc - [NFC] Remove redundant CalculateSmallVectorDefaultInlinedElements usage from to_vector utility
Dawid Jurczak via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 31 02:48:45 PDT 2022
Author: Dawid Jurczak
Date: 2022-07-31T10:51:01+02:00
New Revision: 50eb5bcfcdcdc37e7f6975425c5966194129426f
URL: https://github.com/llvm/llvm-project/commit/50eb5bcfcdcdc37e7f6975425c5966194129426f
DIFF: https://github.com/llvm/llvm-project/commit/50eb5bcfcdcdc37e7f6975425c5966194129426f.diff
LOG: [NFC] Remove redundant CalculateSmallVectorDefaultInlinedElements usage from to_vector utility
CalculateSmallVectorDefaultInlinedElements<..>::value is already used as default value for second template parameter in SmallVector class declaration.
There is no need to pass it explicitly in to_vector.
Extracted from: https://reviews.llvm.org/D129781
Differential Revision: https://reviews.llvm.org/D130774
Added:
Modified:
llvm/include/llvm/ADT/SmallVector.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h
index 2470d6ff9a190..c5a20b74074aa 100644
--- a/llvm/include/llvm/ADT/SmallVector.h
+++ b/llvm/include/llvm/ADT/SmallVector.h
@@ -1282,10 +1282,7 @@ SmallVector<ValueTypeFromRangeType<R>, Size> to_vector(R &&Range) {
return {std::begin(Range), std::end(Range)};
}
template <typename R>
-SmallVector<ValueTypeFromRangeType<R>,
- CalculateSmallVectorDefaultInlinedElements<
- ValueTypeFromRangeType<R>>::value>
-to_vector(R &&Range) {
+SmallVector<ValueTypeFromRangeType<R>> to_vector(R &&Range) {
return {std::begin(Range), std::end(Range)};
}
More information about the llvm-commits
mailing list