summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
index 9efb021caa83..3ab32641d9c1 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
@@ -1,5 +1,4 @@
-//===-- ItaniumABILanguageRuntime.cpp --------------------------------------*-
-//C++ -*-===//
+//===-- ItaniumABILanguageRuntime.cpp -------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -9,6 +8,7 @@
#include "ItaniumABILanguageRuntime.h"
+#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "lldb/Breakpoint/BreakpointLocation.h"
#include "lldb/Core/Mangled.h"
#include "lldb/Core/Module.h"
@@ -21,7 +21,6 @@
#include "lldb/Interpreter/CommandObject.h"
#include "lldb/Interpreter/CommandObjectMultiword.h"
#include "lldb/Interpreter/CommandReturnObject.h"
-#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Symbol/Symbol.h"
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/TypeList.h"
@@ -41,6 +40,8 @@
using namespace lldb;
using namespace lldb_private;
+LLDB_PLUGIN_DEFINE_ADV(ItaniumABILanguageRuntime, CXXItaniumABI)
+
static const char *vtable_demangled_prefix = "vtable for ";
char ItaniumABILanguageRuntime::ID = 0;
@@ -73,9 +74,7 @@ TypeAndOrName ItaniumABILanguageRuntime::GetTypeInfoFromVTableAddress(
Symbol *symbol = sc.symbol;
if (symbol != nullptr) {
const char *name =
- symbol->GetMangled()
- .GetDemangledName(lldb::eLanguageTypeC_plus_plus)
- .AsCString();
+ symbol->GetMangled().GetDemangledName().AsCString();
if (name && strstr(name, vtable_demangled_prefix) == name) {
Log *log(
lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
@@ -118,7 +117,7 @@ TypeAndOrName ItaniumABILanguageRuntime::GetTypeInfoFromVTableAddress(
if (class_types.GetSize() == 1) {
type_sp = class_types.GetTypeAtIndex(0);
if (type_sp) {
- if (ClangASTContext::IsCXXClassType(
+ if (TypeSystemClang::IsCXXClassType(
type_sp->GetForwardCompilerType())) {
LLDB_LOGF(
log,
@@ -150,7 +149,7 @@ TypeAndOrName ItaniumABILanguageRuntime::GetTypeInfoFromVTableAddress(
for (i = 0; i < class_types.GetSize(); i++) {
type_sp = class_types.GetTypeAtIndex(i);
if (type_sp) {
- if (ClangASTContext::IsCXXClassType(
+ if (TypeSystemClang::IsCXXClassType(
type_sp->GetForwardCompilerType())) {
LLDB_LOGF(
log,
@@ -238,7 +237,7 @@ bool ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(
if (!type)
return true;
- if (ClangASTContext::AreTypesSame(in_value.GetCompilerType(), type)) {
+ if (TypeSystemClang::AreTypesSame(in_value.GetCompilerType(), type)) {
// The dynamic type we found was the same type, so we don't have a
// dynamic type here...
return false;
@@ -358,8 +357,7 @@ protected:
Mangled mangled(name);
if (mangled.GuessLanguage() == lldb::eLanguageTypeC_plus_plus) {
- ConstString demangled(
- mangled.GetDisplayDemangledName(lldb::eLanguageTypeC_plus_plus));
+ ConstString demangled(mangled.GetDisplayDemangledName());
demangled_any = true;
result.AppendMessageWithFormat("%s ---> %s\n", entry.c_str(),
demangled.GetCString());
@@ -420,12 +418,13 @@ lldb_private::ConstString ItaniumABILanguageRuntime::GetPluginName() {
uint32_t ItaniumABILanguageRuntime::GetPluginVersion() { return 1; }
BreakpointResolverSP ItaniumABILanguageRuntime::CreateExceptionResolver(
- Breakpoint *bkpt, bool catch_bp, bool throw_bp) {
+ const BreakpointSP &bkpt, bool catch_bp, bool throw_bp) {
return CreateExceptionResolver(bkpt, catch_bp, throw_bp, false);
}
BreakpointResolverSP ItaniumABILanguageRuntime::CreateExceptionResolver(
- Breakpoint *bkpt, bool catch_bp, bool throw_bp, bool for_expressions) {
+ const BreakpointSP &bkpt, bool catch_bp, bool throw_bp,
+ bool for_expressions) {
// One complication here is that most users DON'T want to stop at
// __cxa_allocate_expression, but until we can do anything better with
// predicting unwinding the expression parser does. So we have two forms of
@@ -536,8 +535,8 @@ ValueObjectSP ItaniumABILanguageRuntime::GetExceptionObjectForThread(
if (!thread_sp->SafeToCallFunctions())
return {};
- ClangASTContext *clang_ast_context =
- ClangASTContext::GetScratch(m_process->GetTarget());
+ TypeSystemClang *clang_ast_context =
+ TypeSystemClang::GetScratch(m_process->GetTarget());
if (!clang_ast_context)
return {};