llvm/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h

//===-- DIERef.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_DIEREF_H
#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DIEREF_H

#include "lldb/Core/dwarf.h"
#include "lldb/Utility/LLDBAssert.h"
#include <cassert>
#include <optional>

namespace lldb_private::plugin {
namespace dwarf {
/// Identifies a DWARF debug info entry within a given Module. It contains three
/// "coordinates":
/// - file_index: identifies the separate stand alone debug info file
///   that is referred to by the main debug info file. This will be the
///   index of a DWO file for fission, or the .o file on mac when not
///   using a dSYM file. If this field is not set, then this references
///   a DIE inside the original object file.
/// - section: identifies the section of the debug info entry in the given file:
///   debug_info or debug_types.
/// - die_offset: The offset of the debug info entry as an absolute offset from
///   the beginning of the section specified in the section field.
class DIERef {};
static_assert;

DIEArray;
} // namespace dwarf
} // namespace lldb_private::plugin

namespace llvm {
template <> struct format_provider<lldb_private::plugin::dwarf::DIERef> {};
} // namespace llvm

#endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DIEREF_H