| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "na64util/demangle.hh" | ||
| 2 | #include "na64util/str-fmt.hh" | ||
| 3 | |||
| 4 | namespace na64dp { | ||
| 5 | namespace util { | ||
| 6 | |||
| 7 | std::shared_ptr<char> | ||
| 8 | 72 | demangle_cpp(const char *abiName) { | |
| 9 | int status; | ||
| 10 |
1/1✓ Branch 1 taken 72 times.
|
72 | char *ret = abi::__cxa_demangle(abiName, 0, 0, &status); |
| 11 | |||
| 12 | /* NOTE: must free() the returned char when done with it! */ | ||
| 13 | 72 | std::shared_ptr<char> retval; | |
| 14 |
2/3✓ Branch 1 taken 72 times.
✓ Branch 3 taken 72 times.
✗ Branch 4 not taken.
|
144 | retval.reset( (char *)ret, [](char *mem) { if (mem) free((void*)mem); } ); |
| 15 | 144 | return retval; | |
| 16 | } | ||
| 17 | |||
| 18 | } | ||
| 19 | } | ||
| 20 | |||
| 21 |