Use llvm's demangler.

LLVM now has a copy of libcxxabi demangler, so lldb doesn't need to
keep one too.

llvm-svn: 280821
This commit is contained in:
Rafael Espindola 2016-09-07 16:14:00 +00:00
parent 90bcb9176e
commit 9aa7d66aab
5 changed files with 4 additions and 4424 deletions

View File

@ -192,6 +192,7 @@ set(LLVM_LINK_COMPONENTS
bitreader
bitwriter
codegen
demangle
ipo
selectiondag
bitreader

View File

@ -1,19 +0,0 @@
//===-- CxaDemangle.h -------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_CxaDemangle_h_
#define liblldb_CxaDemangle_h_
namespace lldb_private {
char *__cxa_demangle(const char *mangled_name, char *buf, size_t *n,
int *status);
}
#endif

View File

@ -12,7 +12,6 @@ add_lldb_library(lldbCore
ConnectionMachPort.cpp
ConnectionSharedMemory.cpp
ConstString.cpp
CxaDemangle.cpp
DataBufferHeap.cpp
DataBufferMemoryMap.cpp
DataEncoder.cpp

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@
#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/CxaDemangle.h"
#include "llvm/Demangle/Demangle.h"
#include "lldb/Core/FastDemangle.h"
#else
#include <cxxabi.h>
@ -279,7 +279,8 @@ Mangled::GetDemangledName(lldb::LanguageType language) const {
// when necessary
demangled_name = FastDemangle(mangled_name, m_mangled.GetLength());
if (!demangled_name)
demangled_name = __cxa_demangle(mangled_name, NULL, NULL, NULL);
demangled_name =
llvm::itaniumDemangle(mangled_name, NULL, NULL, NULL);
#else
demangled_name = abi::__cxa_demangle(mangled_name, NULL, NULL, NULL);
#endif