Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
demangle.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include <cstdlib>
5
#include <cxxabi.h>
6
#include <string>
7
8
namespace
nix {
9
14
inline
std::string
demangle
(
const
char
* name)
15
{
16
int
status;
17
char
* demangled = abi::__cxa_demangle(name,
nullptr
,
nullptr
, &status);
18
if
(demangled) {
19
std::string result(demangled);
20
std::free(demangled);
21
return
result;
22
}
23
return
name;
24
}
25
26
}
// namespace nix
nix::demangle
std::string demangle(const char *name)
Definition
demangle.hh:14
libutil
include
nix
util
demangle.hh
Generated by
1.18.0