MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Demangle

Function Demangle

tensorflow/stream_executor/lib/demangle.cc:36–48  ·  view source on GitHub ↗

The API reference of abi::__cxa_demangle() can be found in libstdc++'s manual. https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.3/a01696.html

Source from the content-addressed store, hash-verified

34// libstdc++'s manual.
35// https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.3/a01696.html
36string Demangle(const char *mangled) {
37 string demangled;
38 int status = 0;
39 char *result = nullptr;
40#if HAS_CXA_DEMANGLE
41 result = abi::__cxa_demangle(mangled, nullptr, nullptr, &status);
42#endif
43 if (status == 0 && result != nullptr) { // Demangling succeeded.
44 demangled.append(result);
45 free(result);
46 }
47 return demangled;
48}
49
50} // namespace port
51} // namespace stream_executor

Callers 1

set_nameMethod · 0.50

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected