GCC Code Coverage Report | |||||||||||||||||||||
|
|||||||||||||||||||||
Line | Branch | Exec | Source |
1 |
#include "gwion_util.h" |
||
2 |
#include "gwion_ast.h" |
||
3 |
|||
4 |
848 |
m_str code_name_set(MemPool p, const m_str name, const m_str file) { |
|
5 |
848 |
const size_t len = strlen(name) + strlen(file) + 2; |
|
6 |
848 |
m_str str = (const m_str)_mp_malloc(p, len); |
|
7 |
848 |
sprintf(str, "%s$%s", name, file); |
|
8 |
848 |
return str; |
|
9 |
} |
||
10 |
|||
11 |
20 |
m_str code_name(const m_str name, const m_bool b) { |
|
12 |
20 |
const m_str str = strchr(name, '$'); |
|
13 |
✓✓✓✗ |
20 |
return (b && str) ? (str + 1) : name; |
14 |
} |
Generated by: GCOVR (Version 4.2) |