diff options
author | Andriy Gapon <avg@icyb.net.ua> | 2012-08-14 17:01:45 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-08-14 17:04:33 +0200 |
commit | bba000ab134e9ac1e62cfe017b424adf7c327954 (patch) | |
tree | 9cb3b3057595f4d22f1caa70da324ed930a75ab1 | |
parent | ff97d2d011adb3f68851b9b045c2073933c0a90a (diff) | |
download | cppunit-bba000ab134e9ac1e62cfe017b424adf7c327954.tar.gz |
workaround problem when mxing older gcc with newer versions, fdo#52539
-rw-r--r-- | src/cppunit/TypeInfoHelper.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cppunit/TypeInfoHelper.cpp b/src/cppunit/TypeInfoHelper.cpp index 2df5786..f2b9a67 100644 --- a/src/cppunit/TypeInfoHelper.cpp +++ b/src/cppunit/TypeInfoHelper.cpp @@ -22,8 +22,11 @@ TypeInfoHelper::getClassName( const std::type_info &info ) int status = 0; char* c_name = 0; - c_name = abi::__cxa_demangle( info.name(), 0, 0, &status ); - + const char* c_origName = info.name(); + if(c_origName[0] == '*') + ++c_origName; + c_name = abi::__cxa_demangle( c_origName, 0, 0, &status ); + std::string name; if(c_name) { @@ -32,7 +35,7 @@ TypeInfoHelper::getClassName( const std::type_info &info ) } else { - name = std::string( info.name() ); + name = std::string( c_origName ); } #else // CPPUNIT_HAVE_GCC_ABI_DEMANGLE |