00001 #include "Utilities/General/interface/ClassName.h" 00002 #include <cxxabi.h> 00003 #include <cstring> 00004 00005 Demangle::Demangle(const char * sc) : demangle(0) { 00006 if (sc==0) return; 00007 int status; 00008 demangle = abi::__cxa_demangle(sc, 0, 0, &status); 00009 if(status == 0) return; 00010 demangle = 0; 00011 if(status == -1) 00012 throw std::bad_alloc(); 00013 else if(status == -2) { 00014 demangle = strdup(sc); 00015 } 00016 } 00017