summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Mangled.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/Mangled.cpp')
-rw-r--r--lldb/source/Core/Mangled.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/lldb/source/Core/Mangled.cpp b/lldb/source/Core/Mangled.cpp
index c279cdfcdbf..7bb58ff24a2 100644
--- a/lldb/source/Core/Mangled.cpp
+++ b/lldb/source/Core/Mangled.cpp
@@ -7,8 +7,17 @@
//
//===----------------------------------------------------------------------===//
+
+#if defined(__APPLE__)
+#define USE_BUILTIN_LIBCXXABI_DEMANGLER 1
+#endif
+
+#if defined(USE_BUILTIN_LIBCXXABI_DEMANGLER)
+#include "lldb/Core/cxa_demangle.h"
+#else
#include <cxxabi.h>
-//#include "lldb/Core/cxa_demangle.h"
+#endif
+
#include "llvm/ADT/DenseMap.h"
@@ -195,8 +204,11 @@ Mangled::GetDemangledName () const
{
// We didn't already mangle this name, demangle it and if all goes well
// add it to our map.
+#if defined(USE_BUILTIN_LIBCXXABI_DEMANGLER)
+ char *demangled_name = lldb_cxxabiv1::__cxa_demangle (mangled_cstr, NULL, NULL, NULL);
+#else
char *demangled_name = abi::__cxa_demangle (mangled_cstr, NULL, NULL, NULL);
- //char *demangled_name = lldb_cxxabiv1::__cxa_demangle (mangled_cstr, NULL, NULL, NULL);
+#endif
if (demangled_name)
{
OpenPOWER on IntegriCloud