Index: cmake/modules/LLDBConfig.cmake =================================================================== --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -401,3 +401,12 @@ "- ignore this warning and accept occasional instability") endif() endif() + +if(MSVC) + set(LLDB_USE_BUILTIN_DEMANGLER ON) +else() + option(LLDB_USE_BUILTIN_DEMANGLER "Use lldb's builtin demangler instead of the system one" ON) +endif() +if(LLDB_USE_BUILTIN_DEMANGLER) + add_definitions(-DLLDB_USE_BUILTIN_DEMANGLER) +endif() Index: source/Core/Mangled.cpp =================================================================== --- source/Core/Mangled.cpp +++ source/Core/Mangled.cpp @@ -14,20 +14,15 @@ #include "lldb/Host/windows/windows.h" #include #pragma comment(lib, "dbghelp.lib") -#define LLDB_USE_BUILTIN_DEMANGLER -#elif defined (__FreeBSD__) -#define LLDB_USE_BUILTIN_DEMANGLER -#else -#include #endif #ifdef LLDB_USE_BUILTIN_DEMANGLER - // Provide a fast-path demangler implemented in FastDemangle.cpp until it can // replace the existing C++ demangler with a complete implementation #include "lldb/Core/FastDemangle.h" #include "lldb/Core/CxaDemangle.h" - +#else +#include #endif