summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorAndrew Kaster <andrewdkaster@gmail.com>2020-05-16 14:05:35 -0600
committerAndreas Kling <kling@serenityos.org>2020-05-20 08:37:50 +0200
commit4361a502255e409f04c9325ef73f3cd10f9cafdb (patch)
treeb40a8721a7f400443890c49ed8fed83c764f4efb /AK
parentaff594f1e790feff0cd7dda3e9f0ecd5573c51bf (diff)
downloadserenity-4361a502255e409f04c9325ef73f3cd10f9cafdb.zip
AK: Don't demangle in serenity :(
In order to remove libstdc++ completely, we need to give up on their implementation of abi::__cxa_demangle. The demangler logic will actually have to be quite complex, and included in both the kernel and userspace. A definite fixme for the future, to parse the mangled names into real deal names.
Diffstat (limited to 'AK')
-rw-r--r--AK/Demangle.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/AK/Demangle.h b/AK/Demangle.h
index 42dc1cdae4..b377556e4b 100644
--- a/AK/Demangle.h
+++ b/AK/Demangle.h
@@ -29,7 +29,7 @@
#include <AK/String.h>
#include <AK/StringView.h>
-#ifndef BUILDING_SERENITY_TOOLCHAIN
+#ifndef __serenity__
# include <cxxabi.h>
#endif
@@ -37,9 +37,10 @@ namespace AK {
inline String demangle(const StringView& name)
{
-#ifdef BUILDING_SERENITY_TOOLCHAIN
+#ifdef __serenity__
return name;
#else
+ // FIXME: Implement __cxa_demangle in serenity
int status = 0;
auto* demangled_name = abi::__cxa_demangle(name.to_string().characters(), nullptr, nullptr, &status);
auto string = String(status == 0 ? demangled_name : name);