demangle_impl.h 451 B

123456789101112131415161718192021
  1. #pragma once
  2. #include <util/generic/ptr.h>
  3. #include <util/generic/string.h>
  4. namespace NPrivate {
  5. /*
  6. * cxxabi::__cxa_demangle (and thus TCppDemanger) have terrible memory ownership model.
  7. *
  8. * Consider using CppDemangle instead. It is slow, but robust.
  9. */
  10. class TCppDemangler {
  11. public:
  12. const char* Demangle(const char* name);
  13. private:
  14. THolder<char, TFree> TmpBuf_;
  15. };
  16. } // namespace NPrivate