diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-03 06:26:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-03 06:27:54 +0100 |
commit | c600280ddec6d72f9db25b5e0827118ea03eac74 (patch) | |
tree | ac4869ee698c849f310f4639200e402f88b43b18 /AK | |
parent | 9dc78338ad962236af8b663bb739a3532536532a (diff) | |
download | serenity-c600280ddec6d72f9db25b5e0827118ea03eac74.zip |
AK: The <cxxabi.h> header is not available during Toolchain build
This will need some refinement, but basically since we build LibC
during the toolchain build, we don't have libstdc++ headers yet.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/Demangle.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/AK/Demangle.h b/AK/Demangle.h index d898585fed..bc422f5f6b 100644 --- a/AK/Demangle.h +++ b/AK/Demangle.h @@ -27,18 +27,25 @@ #pragma once #include <AK/String.h> + +#ifndef SERENITY_LIBC_BUILD #include <cxxabi.h> +#endif namespace AK { inline String demangle(const StringView& name) { +#ifdef SERENITY_LIBC_BUILD + return name; +#else 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; +#endif } } |