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