forked from OSchip/llvm-project
DebugNamesDWARFIndex: Add type lookup suport
This implements just one of the GetTypes overloads. The other is not testable from lldb-test so I'm leaving it unimplemented until I figure out what to do with testing. llvm-svn: 334190
This commit is contained in:
parent
f1c868ef08
commit
6938969223
|
@ -17,6 +17,16 @@
|
|||
// RUN: lldb-test symbols --name=not_there --find=type %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=type %t | \
|
||||
// RUN: FileCheck --check-prefix=NAME %s
|
||||
// RUN: lldb-test symbols --name=foo --context=context --find=type %t | \
|
||||
// RUN: FileCheck --check-prefix=CONTEXT %s
|
||||
// RUN: lldb-test symbols --name=not_there --find=type %t | \
|
||||
// RUN: FileCheck --check-prefix=EMPTY %s
|
||||
|
||||
// EMPTY: Found 0 types:
|
||||
// NAME: Found 4 types:
|
||||
// CONTEXT: Found 1 types:
|
||||
|
|
|
@ -98,6 +98,16 @@ void DebugNamesDWARFIndex::GetGlobalVariables(const RegularExpression ®ex,
|
|||
}
|
||||
}
|
||||
|
||||
void DebugNamesDWARFIndex::GetTypes(ConstString name, DIEArray &offsets) {
|
||||
m_fallback.GetTypes(name, offsets);
|
||||
|
||||
for (const DebugNames::Entry &entry :
|
||||
m_debug_names_up->equal_range(name.GetStringRef())) {
|
||||
if (isType(entry.tag()))
|
||||
Append(entry, offsets);
|
||||
}
|
||||
}
|
||||
|
||||
void DebugNamesDWARFIndex::GetNamespaces(ConstString name, DIEArray &offsets) {
|
||||
m_fallback.GetNamespaces(name, offsets);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
void GetObjCMethods(ConstString class_name, DIEArray &offsets) override {}
|
||||
void GetCompleteObjCClass(ConstString class_name, bool must_be_implementation,
|
||||
DIEArray &offsets) override {}
|
||||
void GetTypes(ConstString name, 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 GetFunctions(ConstString name, DWARFDebugInfo &info,
|
||||
|
|
Loading…
Reference in New Issue