[llvm] 846b676 - SmallVector: Declare explicit instantiations.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 28 07:12:27 PST 2022
Author: Thomas Köppe
Date: 2022-11-28T16:10:35+01:00
New Revision: 846b676766d8928249790cbb73f9fb4f1c4c8e0d
URL: https://github.com/llvm/llvm-project/commit/846b676766d8928249790cbb73f9fb4f1c4c8e0d
DIFF: https://github.com/llvm/llvm-project/commit/846b676766d8928249790cbb73f9fb4f1c4c8e0d.diff
LOG: SmallVector: Declare explicit instantiations.
This was an ODR violation
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 bbc5bc8ceeea8..98dce891688da 100644
--- a/llvm/include/llvm/ADT/SmallVector.h
+++ b/llvm/include/llvm/ADT/SmallVector.h
@@ -1312,6 +1312,12 @@ template <typename Out, typename R> SmallVector<Out> to_vector_of(R &&Range) {
return {std::begin(Range), std::end(Range)};
}
+// Explicit instantiations
+extern template class llvm::SmallVectorBase<uint32_t>;
+#if SIZE_MAX > UINT32_MAX
+extern template class llvm::SmallVectorBase<uint64_t>;
+#endif
+
} // end namespace llvm
namespace std {
More information about the llvm-commits
mailing list