GCC Code Coverage Report


Directory: ./
File: src/util/demangle.cc
Date: 2025-09-01 06:19:01
Exec Total Coverage
Lines: 5 5 100.0%
Functions: 2 2 100.0%
Branches: 3 4 75.0%

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