From e9982672823ab7a98ac2d893352c747cc827ce62 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Mon, 6 Aug 2012 15:55:38 +0000 Subject: 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 --- lldb/source/Core/Mangled.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'lldb/source/Core/Mangled.cpp') 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 -//#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) { -- cgit v1.2.3