summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/include/lldb/Symbol/ClangASTContext.h3
-rw-r--r--lldb/include/lldb/Symbol/CompilerDeclContext.h3
-rw-r--r--lldb/include/lldb/Symbol/GoASTContext.h6
-rw-r--r--lldb/include/lldb/Symbol/SymbolFile.h1
-rw-r--r--lldb/include/lldb/Symbol/TypeSystem.h3
-rw-r--r--lldb/include/lldb/Target/CPPLanguageRuntime.h3
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp76
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp31
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp16
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h3
-rw-r--r--lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp51
-rw-r--r--lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h3
-rw-r--r--lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h4
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DIERef.h12
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp52
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h7
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp12
-rw-r--r--lldb/source/Symbol/CompilerDeclContext.cpp9
-rw-r--r--lldb/source/Symbol/SymbolFile.cpp6
19 files changed, 205 insertions, 96 deletions
diff --git a/lldb/include/lldb/Symbol/ClangASTContext.h b/lldb/include/lldb/Symbol/ClangASTContext.h
index 0314ce060e3..bd3a113e6cc 100644
--- a/lldb/include/lldb/Symbol/ClangASTContext.h
+++ b/lldb/include/lldb/Symbol/ClangASTContext.h
@@ -573,6 +573,9 @@ public:
ConstString
DeclContextGetName (void *opaque_decl_ctx) override;
+ ConstString
+ DeclContextGetScopeQualifiedName (void *opaque_decl_ctx) override;
+
bool
DeclContextIsClassMethod (void *opaque_decl_ctx,
lldb::LanguageType *language_ptr,
diff --git a/lldb/include/lldb/Symbol/CompilerDeclContext.h b/lldb/include/lldb/Symbol/CompilerDeclContext.h
index 70399b2dbb3..9135b44323b 100644
--- a/lldb/include/lldb/Symbol/CompilerDeclContext.h
+++ b/lldb/include/lldb/Symbol/CompilerDeclContext.h
@@ -128,6 +128,9 @@ public:
ConstString
GetName () const;
+ ConstString
+ GetScopeQualifiedName() const;
+
bool
IsStructUnionOrClass () const;
diff --git a/lldb/include/lldb/Symbol/GoASTContext.h b/lldb/include/lldb/Symbol/GoASTContext.h
index 3de98da5995..09d79bacc58 100644
--- a/lldb/include/lldb/Symbol/GoASTContext.h
+++ b/lldb/include/lldb/Symbol/GoASTContext.h
@@ -112,6 +112,12 @@ class GoASTContext : public TypeSystem
return ConstString();
}
+ ConstString
+ DeclContextGetScopeQualifiedName(void *opaque_decl_ctx) override
+ {
+ return ConstString();
+ }
+
bool
DeclContextIsClassMethod(void *opaque_decl_ctx, lldb::LanguageType *language_ptr, bool *is_instance_method_ptr,
ConstString *language_object_name_ptr) override
diff --git a/lldb/include/lldb/Symbol/SymbolFile.h b/lldb/include/lldb/Symbol/SymbolFile.h
index e27b32d01f6..fe74ad4f933 100644
--- a/lldb/include/lldb/Symbol/SymbolFile.h
+++ b/lldb/include/lldb/Symbol/SymbolFile.h
@@ -144,6 +144,7 @@ public:
virtual uint32_t FindTypes (const SymbolContext& sc, const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, TypeMap& types);
virtual size_t FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types);
+ virtual void GetMangledNamesForFunction(const std::string &scope_qualified_name, std::vector<ConstString> &mangled_names);
// virtual uint32_t FindTypes (const SymbolContext& sc, const RegularExpression& regex, bool append, uint32_t max_matches, TypeList& types) = 0;
virtual TypeList * GetTypeList ();
virtual size_t GetTypes (lldb_private::SymbolContextScope *sc_scope,
diff --git a/lldb/include/lldb/Symbol/TypeSystem.h b/lldb/include/lldb/Symbol/TypeSystem.h
index d367bcdc0b1..9b43b9dec37 100644
--- a/lldb/include/lldb/Symbol/TypeSystem.h
+++ b/lldb/include/lldb/Symbol/TypeSystem.h
@@ -151,6 +151,9 @@ public:
virtual ConstString
DeclContextGetName (void *opaque_decl_ctx) = 0;
+ virtual ConstString
+ DeclContextGetScopeQualifiedName (void *opaque_decl_ctx) = 0;
+
virtual bool
DeclContextIsClassMethod (void *opaque_decl_ctx,
lldb::LanguageType *language_ptr,
diff --git a/lldb/include/lldb/Target/CPPLanguageRuntime.h b/lldb/include/lldb/Target/CPPLanguageRuntime.h
index ac537d0ad1e..788f4e60a49 100644
--- a/lldb/include/lldb/Target/CPPLanguageRuntime.h
+++ b/lldb/include/lldb/Target/CPPLanguageRuntime.h
@@ -42,9 +42,6 @@ public:
bool
GetObjectDescription(Stream &str, Value &value, ExecutionContextScope *exe_scope) override;
- virtual size_t
- GetAlternateManglings(const ConstString &mangled, std::vector<ConstString> &alternates) = 0;
-
protected:
//------------------------------------------------------------------
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
index c9bc4b6487c..f4d6b195c7f 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
@@ -36,6 +36,7 @@
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolContext.h"
+#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Symbol/TypeList.h"
@@ -570,6 +571,63 @@ FindCodeSymbolInContext
}
}
+ConstString
+FindBestAlternateMangledName
+(
+ const ConstString &demangled,
+ const LanguageType &lang_type,
+ SymbolContext &sym_ctx
+)
+{
+ CPlusPlusLanguage::MethodName cpp_name(demangled);
+ std::string scope_qualified_name = cpp_name.GetScopeQualifiedName();
+
+ if (!scope_qualified_name.size())
+ return ConstString();
+
+ if (!sym_ctx.module_sp)
+ return ConstString();
+
+ SymbolVendor *sym_vendor = sym_ctx.module_sp->GetSymbolVendor();
+ if (!sym_vendor)
+ return ConstString();
+
+ lldb_private::SymbolFile *sym_file = sym_vendor->GetSymbolFile();
+ if (!sym_file)
+ return ConstString();
+
+ std::vector<ConstString> alternates;
+ sym_file->GetMangledNamesForFunction(scope_qualified_name, alternates);
+
+ std::vector<ConstString> param_and_qual_matches;
+ std::vector<ConstString> param_matches;
+ for (size_t i = 0; i < alternates.size(); i++)
+ {
+ ConstString alternate_mangled_name = alternates[i];
+ Mangled mangled(alternate_mangled_name, true);
+ ConstString demangled = mangled.GetDemangledName(lang_type);
+
+ CPlusPlusLanguage::MethodName alternate_cpp_name(demangled);
+ if (!cpp_name.IsValid())
+ continue;
+
+ if (alternate_cpp_name.GetArguments() == cpp_name.GetArguments())
+ {
+ if (alternate_cpp_name.GetQualifiers() == cpp_name.GetQualifiers())
+ param_and_qual_matches.push_back(alternate_mangled_name);
+ else
+ param_matches.push_back(alternate_mangled_name);
+ }
+ }
+
+ if (param_and_qual_matches.size())
+ return param_and_qual_matches[0]; // It is assumed that there will be only one!
+ else if (param_matches.size())
+ return param_matches[0]; // Return one of them as a best match
+ else
+ return ConstString();
+}
+
bool
ClangExpressionDeclMap::GetFunctionAddress
(
@@ -603,15 +661,25 @@ ClangExpressionDeclMap::GetFunctionAddress
if (Language::LanguageIsCPlusPlus(lang_type) &&
CPlusPlusLanguage::IsCPPMangledName(name.AsCString()))
{
- // 1. Demangle the name
Mangled mangled(name, true);
ConstString demangled = mangled.GetDemangledName(lang_type);
if (demangled)
{
- FindCodeSymbolInContext(
- demangled, m_parser_vars->m_sym_ctx, eFunctionNameTypeFull, sc_list);
- sc_list_size = sc_list.GetSize();
+ ConstString best_alternate_mangled_name = FindBestAlternateMangledName(demangled, lang_type, sc);
+ if (best_alternate_mangled_name)
+ {
+ FindCodeSymbolInContext(
+ best_alternate_mangled_name, m_parser_vars->m_sym_ctx, eFunctionNameTypeAuto, sc_list);
+ sc_list_size = sc_list.GetSize();
+ }
+
+ if (sc_list_size == 0)
+ {
+ FindCodeSymbolInContext(
+ demangled, m_parser_vars->m_sym_ctx, eFunctionNameTypeFull, sc_list);
+ sc_list_size = sc_list.GetSize();
+ }
}
}
}
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
index 37b7bd1d2c8..509c594280a 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
@@ -36,7 +36,6 @@
#include "lldb/Host/Endian.h"
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Symbol/CompilerType.h"
-#include "lldb/Target/CPPLanguageRuntime.h"
#include <map>
@@ -230,36 +229,6 @@ IRForTarget::GetFunctionAddress (llvm::Function *fun,
{
std::vector<lldb_private::ConstString> alternates;
bool found_it = m_decl_map->GetFunctionAddress (name, fun_addr);
- if (!found_it)
- {
- if (log)
- log->Printf("Address of function \"%s\" not found.\n", name.GetCString());
- // Check for an alternate mangling for names from the standard library.
- // For example, "std::basic_string<...>" has an alternate mangling scheme per
- // the Itanium C++ ABI.
- lldb::ProcessSP process_sp = m_data_allocator.GetTarget()->GetProcessSP();
- if (process_sp)
- {
- lldb_private::CPPLanguageRuntime *cpp_runtime = process_sp->GetCPPLanguageRuntime();
- if (cpp_runtime && cpp_runtime->GetAlternateManglings(name, alternates))
- {
- for (size_t i = 0; i < alternates.size(); ++i)
- {
- const lldb_private::ConstString &alternate_name = alternates[i];
- if (log)
- log->Printf("Looking up address of function \"%s\" with alternate name \"%s\"",
- name.GetCString(), alternate_name.GetCString());
- if ((found_it = m_decl_map->GetFunctionAddress (alternate_name, fun_addr)))
- {
- if (log)
- log->Printf("Found address of function \"%s\" with alternate name \"%s\"",
- name.GetCString(), alternate_name.GetCString());
- break;
- }
- }
- }
- }
- }
if (!found_it)
{
diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
index a554aa57d58..09031e2f806 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
@@ -296,6 +296,22 @@ CPlusPlusLanguage::MethodName::GetQualifiers ()
return m_qualifiers;
}
+std::string
+CPlusPlusLanguage::MethodName::GetScopeQualifiedName ()
+{
+ if (!m_parsed)
+ Parse();
+ if (m_basename.empty() || m_context.empty())
+ return std::string();
+
+ std::string res;
+ res += m_context;
+ res += "::";
+ res += m_basename;
+
+ return res;
+}
+
bool
CPlusPlusLanguage::IsCPPMangledName (const char *name)
{
diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
index 1a8c0f6938a..f0fc07e2006 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
+++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
@@ -89,6 +89,9 @@ public:
{
return m_full;
}
+
+ std::string
+ GetScopeQualifiedName ();
llvm::StringRef
GetBasename ();
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
index a5fa004493a..8e2cfb5570d 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
@@ -319,46 +319,6 @@ ItaniumABILanguageRuntime::IsVTableName (const char *name)
return false;
}
-static std::map<ConstString, std::vector<ConstString> >&
-GetAlternateManglingPrefixes()
-{
- static std::map<ConstString, std::vector<ConstString> > g_alternate_mangling_prefixes;
- return g_alternate_mangling_prefixes;
-}
-
-
-size_t
-ItaniumABILanguageRuntime::GetAlternateManglings(const ConstString &mangled, std::vector<ConstString> &alternates)
-{
- if (!mangled)
- return static_cast<size_t>(0);
-
- alternates.clear();
- const char *mangled_cstr = mangled.AsCString();
- std::map<ConstString, std::vector<ConstString> >& alternate_mangling_prefixes = GetAlternateManglingPrefixes();
- for (std::map<ConstString, std::vector<ConstString> >::iterator it = alternate_mangling_prefixes.begin();
- it != alternate_mangling_prefixes.end();
- ++it)
- {
- const char *prefix_cstr = it->first.AsCString();
- if (strncmp(mangled_cstr, prefix_cstr, strlen(prefix_cstr)) == 0)
- {
- const std::vector<ConstString> &alternate_prefixes = it->second;
- for (size_t i = 0; i < alternate_prefixes.size(); ++i)
- {
- std::string alternate_mangling(alternate_prefixes[i].AsCString());
- alternate_mangling.append(mangled_cstr + strlen(prefix_cstr));
-
- alternates.push_back(ConstString(alternate_mangling.c_str()));
- }
-
- return alternates.size();
- }
- }
-
- return static_cast<size_t>(0);
-}
-
//------------------------------------------------------------------
// Static Functions
//------------------------------------------------------------------
@@ -382,17 +342,6 @@ ItaniumABILanguageRuntime::Initialize()
PluginManager::RegisterPlugin (GetPluginNameStatic(),
"Itanium ABI for the C++ language",
CreateInstance);
-
- // Alternate manglings for std::basic_string<...>
- std::vector<ConstString> basic_string_alternates;
- basic_string_alternates.push_back(ConstString("_ZNSs"));
- basic_string_alternates.push_back(ConstString("_ZNKSs"));
- std::map<ConstString, std::vector<ConstString> >& alternate_mangling_prefixes = GetAlternateManglingPrefixes();
-
- alternate_mangling_prefixes[ConstString("_ZNSbIcSt17char_traits<char>St15allocator<char>E")] =
- basic_string_alternates;
- alternate_mangling_prefixes[ConstString("_ZNKSbIcSt17char_traits<char>St15allocator<char>E")] =
- basic_string_alternates;
}
void
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
index 519a3cee36d..c06b9863a9b 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
@@ -80,9 +80,6 @@ namespace lldb_private {
lldb::SearchFilterSP
CreateExceptionSearchFilter() override;
- size_t
- GetAlternateManglings(const ConstString &mangled, std::vector<ConstString> &alternates) override;
-
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
index a2ca8b7f74f..2fe439017bb 100644
--- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -207,10 +207,6 @@ public:
void Status(Stream &strm) const;
- size_t GetAlternateManglings(const ConstString &mangled, std::vector<ConstString> &alternates) override {
- return static_cast<size_t>(0);
- }
-
void ModulesDidLoad(const ModuleList &module_list) override;
bool LoadAllocation(Stream &strm, const uint32_t alloc_id, const char* filename, StackFrame* frame_ptr);
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h b/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
index a5484db6bd6..3df07d51174 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
@@ -33,6 +33,18 @@ struct DIERef
lldb::user_id_t
GetUID() const;
+ bool
+ operator< (const DIERef &ref) const
+ {
+ return die_offset < ref.die_offset;
+ }
+
+ bool
+ operator< (const DIERef &ref)
+ {
+ return die_offset < ref.die_offset;
+ }
+
dw_offset_t cu_offset;
dw_offset_t die_offset;
};
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 0ed4d05be5c..423b73de936 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2927,6 +2927,40 @@ SymbolFileDWARF::FindFunctions(const RegularExpression& regex, bool include_inli
return sc_list.GetSize() - original_size;
}
+void
+SymbolFileDWARF::GetMangledNamesForFunction (const std::string &scope_qualified_name,
+ std::vector<ConstString> &mangled_names)
+{
+ DWARFDebugInfo* info = DebugInfo();
+ uint32_t num_comp_units = 0;
+ if (info)
+ num_comp_units = info->GetNumCompileUnits();
+
+ for (uint32_t i = 0; i < num_comp_units; i++)
+ {
+ DWARFCompileUnit *cu = info->GetCompileUnitAtIndex(i);
+ if (cu == nullptr)
+ continue;
+
+ SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile();
+ if (dwo)
+ dwo->GetMangledNamesForFunction(scope_qualified_name, mangled_names);
+ }
+
+ NameToOffsetMap::iterator iter = m_function_scope_qualified_name_map.find(scope_qualified_name);
+ if (iter == m_function_scope_qualified_name_map.end())
+ return;
+
+ DIERefSetSP set_sp = (*iter).second;
+ std::set<DIERef>::iterator set_iter;
+ for (set_iter = set_sp->begin(); set_iter != set_sp->end(); set_iter++)
+ {
+ DWARFDIE die = DebugInfo()->GetDIE (*set_iter);
+ mangled_names.push_back(ConstString(die.GetMangledName()));
+ }
+}
+
+
uint32_t
SymbolFileDWARF::FindTypes (const SymbolContext& sc,
const ConstString &name,
@@ -3751,6 +3785,24 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, const DWARFDIE &die, bool *
TypeList* type_list = GetTypeList();
if (type_list)
type_list->Insert(type_sp);
+
+ if (die.Tag() == DW_TAG_subprogram)
+ {
+ DIERef die_ref = die.GetDIERef();
+ std::string scope_qualified_name(GetDeclContextForUID(die.GetID()).GetScopeQualifiedName().AsCString(""));
+ if (scope_qualified_name.size())
+ {
+ NameToOffsetMap::iterator iter = m_function_scope_qualified_name_map.find(scope_qualified_name);
+ if (iter != m_function_scope_qualified_name_map.end())
+ (*iter).second->insert(die_ref);
+ else
+ {
+ DIERefSetSP new_set(new std::set<DIERef>);
+ new_set->insert(die_ref);
+ m_function_scope_qualified_name_map.emplace(std::make_pair(scope_qualified_name, new_set));
+ }
+ }
+ }
}
}
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index c2e78a417b7..be097595346 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -208,6 +208,10 @@ public:
bool append,
lldb_private::SymbolContextList& sc_list) override;
+ void
+ GetMangledNamesForFunction (const std::string &scope_qualified_name,
+ std::vector<lldb_private::ConstString> &mangled_names) override;
+
uint32_t
FindTypes (const lldb_private::SymbolContext& sc,
const lldb_private::ConstString &name,
@@ -577,6 +581,9 @@ protected:
m_fetched_external_modules:1;
lldb_private::LazyBool m_supports_DW_AT_APPLE_objc_complete_type;
+ typedef std::shared_ptr<std::set<DIERef> > DIERefSetSP;
+ typedef std::unordered_map<std::string, DIERefSetSP> NameToOffsetMap;
+ NameToOffsetMap m_function_scope_qualified_name_map;
std::unique_ptr<DWARFDebugRanges> m_ranges;
UniqueDWARFASTTypeMap m_unique_ast_type_map;
DIEToTypePtr m_die_to_type;
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 8b11c239aab..a0834757443 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -9969,6 +9969,18 @@ ClangASTContext::DeclContextGetName (void *opaque_decl_ctx)
return ConstString();
}
+ConstString
+ClangASTContext::DeclContextGetScopeQualifiedName (void *opaque_decl_ctx)
+{
+ if (opaque_decl_ctx)
+ {
+ clang::NamedDecl *named_decl = llvm::dyn_cast<clang::NamedDecl>((clang::DeclContext *)opaque_decl_ctx);
+ if (named_decl)
+ return ConstString(llvm::StringRef(named_decl->getQualifiedNameAsString()));
+ }
+ return ConstString();
+}
+
bool
ClangASTContext::DeclContextIsClassMethod (void *opaque_decl_ctx,
lldb::LanguageType *language_ptr,
diff --git a/lldb/source/Symbol/CompilerDeclContext.cpp b/lldb/source/Symbol/CompilerDeclContext.cpp
index e44cee67284..8bee1b48753 100644
--- a/lldb/source/Symbol/CompilerDeclContext.cpp
+++ b/lldb/source/Symbol/CompilerDeclContext.cpp
@@ -38,6 +38,15 @@ CompilerDeclContext::GetName () const
return ConstString();
}
+ConstString
+CompilerDeclContext::GetScopeQualifiedName () const
+{
+ if (IsValid())
+ return m_type_system->DeclContextGetScopeQualifiedName(m_opaque_decl_ctx);
+ else
+ return ConstString();
+}
+
bool
CompilerDeclContext::IsStructUnionOrClass () const
{
diff --git a/lldb/source/Symbol/SymbolFile.cpp b/lldb/source/Symbol/SymbolFile.cpp
index 51e35048d5c..82bbceb9610 100644
--- a/lldb/source/Symbol/SymbolFile.cpp
+++ b/lldb/source/Symbol/SymbolFile.cpp
@@ -134,6 +134,12 @@ SymbolFile::FindFunctions (const RegularExpression& regex, bool include_inlines,
return 0;
}
+void
+SymbolFile::GetMangledNamesForFunction(const std::string &scope_qualified_name, std::vector<ConstString> &mangled_names)
+{
+ return;
+}
+
uint32_t
SymbolFile::FindTypes (const SymbolContext& sc, const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, TypeMap& types)
{
OpenPOWER on IntegriCloud