summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/cmake/modules/LLDBConfig.cmake9
-rw-r--r--lldb/source/Core/Mangled.cpp9
2 files changed, 11 insertions, 7 deletions
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index 043b3260484..66ba12607a4 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -401,3 +401,12 @@ if(LLDB_USING_LIBSTDCXX)
"- 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()
diff --git a/lldb/source/Core/Mangled.cpp b/lldb/source/Core/Mangled.cpp
index 31e78ced2c1..5a1f1e83554 100644
--- a/lldb/source/Core/Mangled.cpp
+++ b/lldb/source/Core/Mangled.cpp
@@ -14,20 +14,15 @@
#include "lldb/Host/windows/windows.h"
#include <Dbghelp.h>
#pragma comment(lib, "dbghelp.lib")
-#define LLDB_USE_BUILTIN_DEMANGLER
-#elif defined (__FreeBSD__)
-#define LLDB_USE_BUILTIN_DEMANGLER
-#else
-#include <cxxabi.h>
#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 <cxxabi.h>
#endif
OpenPOWER on IntegriCloud