forked from OSchip/llvm-project
[libc++] Split off iostreams explicit instantiations into its own source file
This makes it cleaner to add more instantiations without cluttering the actual implementation of ios.
This commit is contained in:
parent
1695c8420a
commit
c6eaa14e11
|
@ -64,6 +64,7 @@ endif()
|
|||
if (LIBCXX_ENABLE_LOCALIZATION)
|
||||
list(APPEND LIBCXX_SOURCES
|
||||
ios.cpp
|
||||
ios.instantiations.cpp
|
||||
iostream.cpp
|
||||
locale.cpp
|
||||
regex.cpp
|
||||
|
|
|
@ -15,30 +15,14 @@
|
|||
#include "__locale"
|
||||
#include "algorithm"
|
||||
#include "include/config_elast.h"
|
||||
#include "istream"
|
||||
#include "limits"
|
||||
#include "memory"
|
||||
#include "new"
|
||||
#include "streambuf"
|
||||
#include "string"
|
||||
#include "__undef_macros"
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<char>;
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<wchar_t>;
|
||||
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<char>;
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<wchar_t>;
|
||||
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<char>;
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<wchar_t>;
|
||||
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<char>;
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<wchar_t>;
|
||||
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_iostream<char>;
|
||||
|
||||
class _LIBCPP_HIDDEN __iostream_category
|
||||
: public __do_message
|
||||
{
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "__config"
|
||||
#include "ios"
|
||||
#include "istream"
|
||||
#include "ostream"
|
||||
#include "streambuf"
|
||||
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
// Original explicit instantiations provided in the library
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<char>;
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<wchar_t>;
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<char>;
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<wchar_t>;
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<char>;
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<wchar_t>;
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<char>;
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<wchar_t>;
|
||||
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_iostream<char>;
|
||||
|
||||
// Add more here if needed...
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
Loading…
Reference in New Issue