[Lldb-commits] [lldb] [lldb] Consult Language plugin in GetDisplayDemangledName (PR #90294)
Dave Lee via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 26 16:14:59 PDT 2024
https://github.com/kastiglione created https://github.com/llvm/llvm-project/pull/90294
None
>From a5e72126d3b0144e5fc0f5b04925f4bf394551e4 Mon Sep 17 00:00:00 2001
From: Dave Lee <davelee.com at gmail.com>
Date: Fri, 26 Apr 2024 16:14:09 -0700
Subject: [PATCH] [lldb] Consult Language plugin in GetDisplayDemangledName
---
lldb/include/lldb/Target/Language.h | 4 ++++
lldb/source/Core/Mangled.cpp | 2 ++
2 files changed, 6 insertions(+)
diff --git a/lldb/include/lldb/Target/Language.h b/lldb/include/lldb/Target/Language.h
index 67714e6fdf942e..ff7c60bf68bfc9 100644
--- a/lldb/include/lldb/Target/Language.h
+++ b/lldb/include/lldb/Target/Language.h
@@ -281,6 +281,10 @@ class Language : public PluginInterface {
return mangled.GetMangledName();
}
+ virtual ConstString GetDisplayDemangledName(Mangled mangled) const {
+ return mangled.GetDemangledName();
+ }
+
virtual void GetExceptionResolverDescription(bool catch_on, bool throw_on,
Stream &s);
diff --git a/lldb/source/Core/Mangled.cpp b/lldb/source/Core/Mangled.cpp
index b167c51fdce247..8efc4c639cca5f 100644
--- a/lldb/source/Core/Mangled.cpp
+++ b/lldb/source/Core/Mangled.cpp
@@ -310,6 +310,8 @@ ConstString Mangled::GetDemangledName() const {
}
ConstString Mangled::GetDisplayDemangledName() const {
+ if (Language *lang = Language::FindPlugin(GuessLanguage()))
+ return lang->GetDisplayDemangledName(*this);
return GetDemangledName();
}
More information about the lldb-commits
mailing list