Skip to content

Commit

Permalink
AK: Turn demangling back on for userspace
Browse files Browse the repository at this point in the history
This didn't work at some point, but now it apparently works again. :^)
  • Loading branch information
awesomekling committed Feb 2, 2020
1 parent ea8d386 commit 8ccf0e1
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions AK/Demangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,12 @@ namespace AK {

inline String demangle(const StringView& name)
{
#ifdef KERNEL
int status = 0;
auto* demangled_name = abi::__cxa_demangle(String(name).characters(), nullptr, nullptr, &status);
auto string = String(status == 0 ? demangled_name : name);
if (status == 0)
kfree(demangled_name);
return string;
#else
return name;
#endif
}

}
Expand Down

0 comments on commit 8ccf0e1

Please sign in to comment.