Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:46

0001 #include "Utilities/General/interface/ClassName.h"
0002 #include <cxxabi.h>
0003 #include <cstring>
0004 
0005 Demangle::Demangle(const char* sc) : demangle(nullptr) {
0006   if (sc == nullptr)
0007     return;
0008   int status;
0009   demangle = abi::__cxa_demangle(sc, nullptr, nullptr, &status);
0010   if (status == 0)
0011     return;
0012   demangle = nullptr;
0013   if (status == -1)
0014     throw std::bad_alloc();
0015   else if (status == -2) {
0016     demangle = strdup(sc);
0017   }
0018 }