Fix Bug 25103 - _cxa_demangle improperly demangles virtual thunks. Thanks to Jason King for the report and suggested fix

llvm-svn: 250097
This commit is contained in:
Marshall Clow 2015-10-12 20:45:05 +00:00
parent bb3c33609b
commit 8ebfb60efa
2 changed files with 3 additions and 1 deletions

View File

@ -4415,7 +4415,7 @@ parse_special_name(const char* first, const char* last, C& db)
{
if (db.names.empty())
return first;
if (first[2] == 'v')
if (first[1] == 'v')
{
db.names.back().first.insert(0, "virtual thunk to ");
first = t;

View File

@ -29594,6 +29594,8 @@ const char* cases[][2] =
{"_Zli2_xy", "operator\"\" _x(unsigned long long)"},
{"_Z1fIiEDcT_", "decltype(auto) f<int>(int)"},
{"_ZZ4testvEN1g3fooE5Point", "test()::g::foo(Point)"},
{"_ZThn12_NSt9strstreamD0Ev", "non-virtual thunk to std::strstream::~strstream()"},
{"_ZTv0_n12_NSt9strstreamD0Ev", "virtual thunk to std::strstream::~strstream()"},
};
const unsigned N = sizeof(cases) / sizeof(cases[0]);