mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 14:49:36 -04:00
master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. Note that for now, I rolled back all our local changes to make merging easier, and I will reapply the still-relevant ones after updating to 11.0.0-rc1.
54 lines
1.5 KiB
C++
54 lines
1.5 KiB
C++
//===-- NameToDIE.h ---------------------------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_NAMETODIE_H
|
|
#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_NAMETODIE_H
|
|
|
|
#include <functional>
|
|
|
|
#include "DIERef.h"
|
|
#include "lldb/Core/UniqueCStringMap.h"
|
|
#include "lldb/Core/dwarf.h"
|
|
#include "lldb/lldb-defines.h"
|
|
|
|
class DWARFUnit;
|
|
|
|
class NameToDIE {
|
|
public:
|
|
NameToDIE() : m_map() {}
|
|
|
|
~NameToDIE() {}
|
|
|
|
void Dump(lldb_private::Stream *s);
|
|
|
|
void Insert(lldb_private::ConstString name, const DIERef &die_ref);
|
|
|
|
void Append(const NameToDIE &other);
|
|
|
|
void Finalize();
|
|
|
|
bool Find(lldb_private::ConstString name,
|
|
llvm::function_ref<bool(DIERef ref)> callback) const;
|
|
|
|
bool Find(const lldb_private::RegularExpression ®ex,
|
|
llvm::function_ref<bool(DIERef ref)> callback) const;
|
|
|
|
void
|
|
FindAllEntriesForUnit(const DWARFUnit &unit,
|
|
llvm::function_ref<bool(DIERef ref)> callback) const;
|
|
|
|
void
|
|
ForEach(std::function<bool(lldb_private::ConstString name,
|
|
const DIERef &die_ref)> const
|
|
&callback) const;
|
|
|
|
protected:
|
|
lldb_private::UniqueCStringMap<DIERef> m_map;
|
|
};
|
|
|
|
#endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_NAMETODIE_H
|