CMS 3D CMS Logo

ClassName.cc
Go to the documentation of this file.
2 #include <cxxabi.h>
3 #include <cstring>
4 
5 Demangle::Demangle(const char * sc) : demangle(nullptr) {
6  if (sc==nullptr) return;
7  int status;
8  demangle = abi::__cxa_demangle(sc, nullptr, nullptr, &status);
9  if(status == 0) return;
10  demangle = nullptr;
11  if(status == -1)
12  throw std::bad_alloc();
13  else if(status == -2) {
14  demangle = strdup(sc);
15  }
16 }
17 
#define nullptr
Demangle(const char *sc)
Definition: ClassName.cc:5
char * demangle
Definition: ClassName.h:25