summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Mangled.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-08-06 15:55:38 +0000
committerGreg Clayton <gclayton@apple.com>2012-08-06 15:55:38 +0000
commite9982672823ab7a98ac2d893352c747cc827ce62 (patch)
tree3c62b420f844dc7af465df1cb4a1a48dd8aadf60 /lldb/source/Core/Mangled.cpp
parent941a6ec9bb9d325d029deeac81c7e7c9ff68d310 (diff)
downloadbcm5719-llvm-e9982672823ab7a98ac2d893352c747cc827ce62.tar.gz
bcm5719-llvm-e9982672823ab7a98ac2d893352c747cc827ce62.zip
<rdar://problem/12029894>
Use the built in demangler for Apple builds for now which has needed demangling fixes, and make the cxa_demangle.cpp use rtti in the Xcode project settings as it requires it be enabled. llvm-svn: 161323
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