re PR c++/28871 (massive C++ compile time slowdown)
2006-09-04 Benjamin Kosnik <bkoz@redhat.com> PR c++/28871 * include/ext/bitmap_allocator.h: Add comment for end of anonymous namespace. * include/ext/rope: Same. * include/bits/cpp_type_traits.h: Same. * include/tr1/tuple: Same. * include/tr1/functional_iterate.h: Same. * include/bits/cpp_type_traits.h: Revert anonymous namespace change, use nested detail instead. * testsuite/lib/libstdc++.exp (libstdc++_init): PCHFLAGS revert to stdc++.h. From-SVN: r116680
This commit is contained in:
parent
88525e1bd3
commit
06e744948b
7 changed files with 37 additions and 21 deletions
|
@ -1,3 +1,19 @@
|
||||||
|
2006-09-04 Benjamin Kosnik <bkoz@redhat.com>
|
||||||
|
|
||||||
|
PR c++/28871
|
||||||
|
* include/ext/bitmap_allocator.h: Add comment for end of anonymous
|
||||||
|
namespace.
|
||||||
|
* include/ext/rope: Same.
|
||||||
|
* include/bits/cpp_type_traits.h: Same.
|
||||||
|
* include/tr1/tuple: Same.
|
||||||
|
* include/tr1/functional_iterate.h: Same.
|
||||||
|
|
||||||
|
* include/bits/cpp_type_traits.h: Revert anonymous namespace
|
||||||
|
change, use nested detail instead.
|
||||||
|
|
||||||
|
* testsuite/lib/libstdc++.exp (libstdc++_init): PCHFLAGS revert to
|
||||||
|
stdc++.h.
|
||||||
|
|
||||||
2006-09-04 Paolo Carlini <pcarlini@suse.de>
|
2006-09-04 Paolo Carlini <pcarlini@suse.de>
|
||||||
|
|
||||||
* src/mt_allocator.cc (__pool<true>::_M_reclaim_block): Do
|
* src/mt_allocator.cc (__pool<true>::_M_reclaim_block): Do
|
||||||
|
|
|
@ -83,6 +83,19 @@ struct __false_type { };
|
||||||
|
|
||||||
_GLIBCXX_BEGIN_NAMESPACE(std)
|
_GLIBCXX_BEGIN_NAMESPACE(std)
|
||||||
|
|
||||||
|
namespace detail
|
||||||
|
{
|
||||||
|
// NB: g++ can not compile these if declared within the class
|
||||||
|
// __is_pod itself.
|
||||||
|
typedef char __one;
|
||||||
|
typedef char __two[2];
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
__one __test_type(int _Tp::*);
|
||||||
|
template<typename _Tp>
|
||||||
|
__two& __test_type(...);
|
||||||
|
} // namespace detail
|
||||||
|
|
||||||
template<bool>
|
template<bool>
|
||||||
struct __truth_type
|
struct __truth_type
|
||||||
{ typedef __false_type __type; };
|
{ typedef __false_type __type; };
|
||||||
|
@ -339,27 +352,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||||
: public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
|
: public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
|
||||||
{ };
|
{ };
|
||||||
|
|
||||||
// NB: g++ can not compile these if declared within the class
|
|
||||||
// __is_pod itself.
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
typedef char __one;
|
|
||||||
typedef char __two[2];
|
|
||||||
|
|
||||||
template<typename _Tp>
|
|
||||||
__one __test_type(int _Tp::*);
|
|
||||||
|
|
||||||
template<typename _Tp>
|
|
||||||
__two& __test_type(...);
|
|
||||||
}
|
|
||||||
|
|
||||||
// For the immediate use, the following is a good approximation.
|
// For the immediate use, the following is a good approximation.
|
||||||
template<typename _Tp>
|
template<typename _Tp>
|
||||||
struct __is_pod
|
struct __is_pod
|
||||||
{
|
{
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
__value = (sizeof(__test_type<_Tp>(0)) != sizeof(__one))
|
__value = (sizeof(detail::__test_type<_Tp>(0))
|
||||||
|
!= sizeof(detail::__one))
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||||
* else do no use any synchronization primitives.
|
* else do no use any synchronization primitives.
|
||||||
*/
|
*/
|
||||||
bool const __threads_enabled = __gthread_active_p();
|
bool const __threads_enabled = __gthread_active_p();
|
||||||
}
|
} // anonymous namespace
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined __GTHREADS
|
#if defined __GTHREADS
|
||||||
|
|
|
@ -71,7 +71,7 @@ namespace
|
||||||
{
|
{
|
||||||
enum { _S_max_rope_depth = 45 };
|
enum { _S_max_rope_depth = 45 };
|
||||||
enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function};
|
enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function};
|
||||||
}
|
} // anonymous namespace
|
||||||
|
|
||||||
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||||
|
|
||||||
|
|
|
@ -396,7 +396,7 @@ namespace placeholders
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
_Placeholder<_GLIBCXX_NUM_ARGS> _GLIBCXX_JOIN(_,_GLIBCXX_NUM_ARGS);
|
_Placeholder<_GLIBCXX_NUM_ARGS> _GLIBCXX_JOIN(_,_GLIBCXX_NUM_ARGS);
|
||||||
}
|
} // anonymous namespace
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -258,7 +258,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
swallow_assign ignore;
|
swallow_assign ignore;
|
||||||
};
|
}; // anonymous namespace
|
||||||
|
|
||||||
#define _GLIBCXX_CAT(x,y) _GLIBCXX_CAT2(x,y)
|
#define _GLIBCXX_CAT(x,y) _GLIBCXX_CAT2(x,y)
|
||||||
#define _GLIBCXX_CAT2(x,y) x##y
|
#define _GLIBCXX_CAT2(x,y) x##y
|
||||||
|
|
|
@ -214,8 +214,8 @@ proc libstdc++_init { testfile } {
|
||||||
"additional_flags=-include additional_flags=bits/stdtr1c++.h"]
|
"additional_flags=-include additional_flags=bits/stdtr1c++.h"]
|
||||||
if {$lines == "" } {
|
if {$lines == "" } {
|
||||||
# set PCH_CXXFLAGS "-include bits/extc++.h"
|
# set PCH_CXXFLAGS "-include bits/extc++.h"
|
||||||
set PCH_CXXFLAGS "-include bits/stdtr1c++.h"
|
# set PCH_CXXFLAGS "-include bits/stdtr1c++.h"
|
||||||
# set PCH_CXXFLAGS "-include bits/stdc++.h"
|
set PCH_CXXFLAGS "-include bits/stdc++.h"
|
||||||
} else {
|
} else {
|
||||||
set PCH_CXXFLAGS ""
|
set PCH_CXXFLAGS ""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue