[cfe-commits] [libcxxabi] r145543 - in /libcxxabi/trunk: src/cxa_demangle.cpp test/test_demangle.cpp
Howard Hinnant
hhinnant at apple.com
Wed Nov 30 16:08:59 PST 2011
Author: hhinnant
Date: Wed Nov 30 18:08:59 2011
New Revision: 145543
URL: http://llvm.org/viewvc/llvm-project?rev=145543&view=rev
Log:
Updated heuristic regulating small string buffer
Modified:
libcxxabi/trunk/src/cxa_demangle.cpp
libcxxabi/trunk/test/test_demangle.cpp
Modified: libcxxabi/trunk/src/cxa_demangle.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp?rev=145543&r1=145542&r2=145543&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_demangle.cpp (original)
+++ libcxxabi/trunk/src/cxa_demangle.cpp Wed Nov 30 18:08:59 2011
@@ -14952,7 +14952,10 @@
#endif
const size_t bs = buf == NULL ? 0 : *n;
ptrdiff_t sm = dmg_tree.__mangled_name_end_ - dmg_tree.__mangled_name_begin_;
- ptrdiff_t est = sm + 50 * (dmg_tree.__node_end_ - dmg_tree.__node_begin_);
+ ptrdiff_t est = sm + 60 * (
+ (dmg_tree.__node_end_ - dmg_tree.__node_begin_) +
+ (dmg_tree.__sub_end_ - dmg_tree.__sub_begin_) +
+ (dmg_tree.__t_end_ - dmg_tree.__t_begin_));
const unsigned N = 4096;
char tmp[N];
ptrdiff_t s;
Modified: libcxxabi/trunk/test/test_demangle.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_demangle.cpp?rev=145543&r1=145542&r2=145543&view=diff
==============================================================================
--- libcxxabi/trunk/test/test_demangle.cpp (original)
+++ libcxxabi/trunk/test/test_demangle.cpp Wed Nov 30 18:08:59 2011
@@ -29556,6 +29556,7 @@
{"_Z2f6IJLi1ELi2ELi3EEE9int_tupleIJXspT_EEEv", "int_tuple<1, 2, 3> f6<1, 2, 3>()"},
{"_Z2f7IJ8identity13add_referenceEE14template_tupleIJDpT_EEv", "template_tuple<identity, add_reference> f7<identity, add_reference>()"},
{"_ZNK10__cxxabiv111__libcxxabi5__sub20first_demangled_nameEPc.eh", "__cxxabiv1::__libcxxabi::__sub::first_demangled_name(char*) const (.eh)"},
+ {"_ZSt13copy_backwardIN9__gnu_cxx17__normal_iteratorIPNS0_19_Hashtable_iteratorISt4pairIK16CSCppSymbolOwnerP20CSCppSymbolOwnerDataES4_27CSCppSymbolOwnerHashFunctorSt10_Select1stIS8_E29CSCppSymbolOwnerEqualsFunctorSaIS7_EEESt6vectorISE_SaISE_EEEESJ_ET0_T_SL_SK_", "__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> >*, std::vector<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> >, std::allocator<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSy
mbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> > > > > std::copy_backward<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> >*, std::vector<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> >, std::allocator<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<
std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> > > > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> >*, std::vector<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> >, std::allocator<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwn
erEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> > > > > >(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> >*, std::vector<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> >, std::allocator<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> > > > >, __gnu_cxx
::__normal_iterator<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> >*, std::vector<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> >, std::allocator<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> > > > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOw
ner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> >*, std::vector<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> >, std::allocator<__gnu_cxx::_Hashtable_iterator<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*>, CSCppSymbolOwner, CSCppSymbolOwnerHashFunctor, std::_Select1st<std::pair<CSCppSymbolOwner const, CSCppSymbolOwnerData*> >, CSCppSymbolOwnerEqualsFunctor, std::allocator<CSCppSymbolOwnerData*> > > > >)"},
};
const unsigned N = sizeof(cases) / sizeof(cases[0]);
More information about the cfe-commits
mailing list