Go to the documentation of this file.00001
00002
00003
00004 #include "utilmm/demangle/demangle.hh"
00005
00006 #if 1 // This will be replaced by a test checking <cxxabi.h>
00007 # include <cxxabi.h>
00008 #include <cstdlib>
00009
00010 std::string utilmm::demangle(char const *name) {
00011 int status;
00012 char *real_name;
00013
00014 real_name = abi::__cxa_demangle(name, 0, 0, &status);
00015
00016
00017
00018
00019
00020
00021 std::string result(real_name);
00022 free(real_name);
00023
00024 return result;
00025 }
00026
00027 #else
00028
00029 # warning "Name demangling is not supported here"
00030
00031 std::string utilmm::demangle(char const *name) {
00032 std::string result(name);
00033 return result;
00034 }
00035
00036 #endif // if 1