1 //===-- NameToDIE.h ---------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_NAMETODIE_H
10 #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_NAMETODIE_H
15 #include "lldb/Core/UniqueCStringMap.h"
16 #include "lldb/Core/dwarf.h"
17 #include "lldb/lldb-defines.h"
23 NameToDIE() : m_map() {}
27 void Dump(lldb_private::Stream *s);
29 void Insert(lldb_private::ConstString name, const DIERef &die_ref);
31 void Append(const NameToDIE &other);
35 bool Find(lldb_private::ConstString name,
36 llvm::function_ref<bool(DIERef ref)> callback) const;
38 bool Find(const lldb_private::RegularExpression ®ex,
39 llvm::function_ref<bool(DIERef ref)> callback) const;
42 FindAllEntriesForUnit(const DWARFUnit &unit,
43 llvm::function_ref<bool(DIERef ref)> callback) const;
46 ForEach(std::function<bool(lldb_private::ConstString name,
47 const DIERef &die_ref)> const
51 lldb_private::UniqueCStringMap<DIERef> m_map;
54 #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_NAMETODIE_H