forked from OSchip/llvm-project
DebugNamesDWARFIndex: add namespace lookup support
llvm-svn: 334186
This commit is contained in:
parent
452bd87cc4
commit
6675e652a3
|
@ -17,6 +17,16 @@
|
|||
// RUN: lldb-test symbols --name=not_there --find=namespace %t | \
|
||||
// RUN: FileCheck --check-prefix=EMPTY %s
|
||||
|
||||
// RUN: clang %s -g -c -emit-llvm -o - --target=x86_64-pc-linux | \
|
||||
// RUN: llc -accel-tables=Dwarf -filetype=obj -o %t.o
|
||||
// RUN: ld.lld %t.o -o %t
|
||||
// RUN: lldb-test symbols --name=foo --find=namespace %t | \
|
||||
// RUN: FileCheck --check-prefix=FOO %s
|
||||
// RUN: lldb-test symbols --name=foo --find=namespace --context=context %t | \
|
||||
// RUN: FileCheck --check-prefix=CONTEXT %s
|
||||
// RUN: lldb-test symbols --name=not_there --find=namespace %t | \
|
||||
// RUN: FileCheck --check-prefix=EMPTY %s
|
||||
|
||||
// FOO: Found namespace: foo
|
||||
|
||||
// CONTEXT: Found namespace: bar::foo
|
||||
|
|
|
@ -98,6 +98,16 @@ void DebugNamesDWARFIndex::GetGlobalVariables(const RegularExpression ®ex,
|
|||
}
|
||||
}
|
||||
|
||||
void DebugNamesDWARFIndex::GetNamespaces(ConstString name, DIEArray &offsets) {
|
||||
m_fallback.GetNamespaces(name, offsets);
|
||||
|
||||
for (const DebugNames::Entry &entry :
|
||||
m_debug_names_up->equal_range(name.GetStringRef())) {
|
||||
if (entry.tag() == DW_TAG_namespace)
|
||||
Append(entry, offsets);
|
||||
}
|
||||
}
|
||||
|
||||
void DebugNamesDWARFIndex::Dump(Stream &s) {
|
||||
m_fallback.Dump(s);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
DIEArray &offsets) override {}
|
||||
void GetTypes(ConstString name, DIEArray &offsets) override {}
|
||||
void GetTypes(const DWARFDeclContext &context, DIEArray &offsets) override {}
|
||||
void GetNamespaces(ConstString name, DIEArray &offsets) override {}
|
||||
void GetNamespaces(ConstString name, DIEArray &offsets) override;
|
||||
void GetFunctions(ConstString name, DWARFDebugInfo &info,
|
||||
const CompilerDeclContext &parent_decl_ctx,
|
||||
uint32_t name_type_mask,
|
||||
|
|
Loading…
Reference in New Issue