[libcxx] r305442 - Move external instantiation for __vector_base_common to vector.cpp

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 18:53:13 PDT 2017


Author: ericwf
Date: Wed Jun 14 20:53:12 2017
New Revision: 305442

URL: http://llvm.org/viewvc/llvm-project?rev=305442&view=rev
Log:
Move external instantiation for __vector_base_common to vector.cpp

Previously the explicit instantiation for this was in locale.cpp,
but that didn't make much sense. This patch creates a new vector.cpp
source file to contain the explicit instantiation.

Added:
    libcxx/trunk/src/vector.cpp
Modified:
    libcxx/trunk/lib/CMakeLists.txt
    libcxx/trunk/src/locale.cpp

Modified: libcxx/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=305442&r1=305441&r2=305442&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Wed Jun 14 20:53:12 2017
@@ -1,6 +1,7 @@
 set(LIBCXX_LIB_CMAKEFILES_DIR "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}"  PARENT_SCOPE)
 
 # Get sources
+# FIXME: Don't use glob here
 file(GLOB LIBCXX_SOURCES ../src/*.cpp)
 if(WIN32)
   file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp)

Modified: libcxx/trunk/src/locale.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/locale.cpp?rev=305442&r1=305441&r2=305442&view=diff
==============================================================================
--- libcxx/trunk/src/locale.cpp (original)
+++ libcxx/trunk/src/locale.cpp Wed Jun 14 20:53:12 2017
@@ -6158,6 +6158,4 @@ template class _LIBCPP_CLASS_TEMPLATE_IN
 template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char16_t, char, mbstate_t>;
 template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char32_t, char, mbstate_t>;
 
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __vector_base_common<true>;
-
 _LIBCPP_END_NAMESPACE_STD

Added: libcxx/trunk/src/vector.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/vector.cpp?rev=305442&view=auto
==============================================================================
--- libcxx/trunk/src/vector.cpp (added)
+++ libcxx/trunk/src/vector.cpp Wed Jun 14 20:53:12 2017
@@ -0,0 +1,16 @@
+//===------------------------- vector.cpp ---------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "vector"
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __vector_base_common<true>;
+
+_LIBCPP_END_NAMESPACE_STD




More information about the cfe-commits mailing list