LLDB mainline
ManualDWARFIndexSet.h
Go to the documentation of this file.
1//===-- ManualDWARFIndexSet.h -----------------------------------*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_MANUALDWARFINDEXSET_H
10#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_MANUALDWARFINDEXSET_H
11
15#include "llvm/ADT/STLExtras.h"
16#include <optional>
17
19
20template <typename T> struct IndexSet {
29
40
41 friend bool operator==(const IndexSet &lhs, const IndexSet &rhs) {
42 return llvm::all_of(Indices(), [&lhs, &rhs](T(IndexSet::*index)) {
43 return lhs.*index == rhs.*index;
44 });
45 }
46};
47
48std::optional<IndexSet<NameToDIE>> DecodeIndexSet(const DataExtractor &data,
49 lldb::offset_t *offset_ptr);
50void EncodeIndexSet(const IndexSet<NameToDIE> &set, DataEncoder &encoder);
51
52} // namespace lldb_private::plugin::dwarf
53
54#endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_MANUALDWARFINDEXSET_H
An binary data encoding class.
Definition DataEncoder.h:42
An data extractor class.
std::optional< IndexSet< NameToDIE > > DecodeIndexSet(const DataExtractor &data, lldb::offset_t *offset_ptr)
void EncodeIndexSet(const IndexSet< NameToDIE > &set, DataEncoder &encoder)
uint64_t offset_t
Definition lldb-types.h:85
static std::array< T(IndexSet::*), 8 > Indices()
friend bool operator==(const IndexSet &lhs, const IndexSet &rhs)