diff options
| author | Andriy Gapon <avg@icyb.net.ua> | 2012-08-14 17:01:45 +0200 |
|---|---|---|
| committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-09-24 19:23:15 +0200 |
| commit | 50b8c38f08115d7012d8549f1ad3ac9109a993ff (patch) | |
| tree | 0551a085180cfa83a48d12e421e58dc69874627c /src/cppunit | |
| parent | f51ea27b71ae63188018767674c518c6b3197a09 (diff) | |
| download | cppunit-50b8c38f08115d7012d8549f1ad3ac9109a993ff.tar.gz | |
workaround problem when mixing older gcc with newer versions, fdo#52539
Diffstat (limited to 'src/cppunit')
| -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 8c97178..ee8f711 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 |
