// 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:
}
}
+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);
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,