llvm/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h

//===- llvm/CodeGen/DwarfStringPoolEntry.h - String pool entry --*- 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 LLVM_CODEGEN_DWARFSTRINGPOOLENTRY_H
#define LLVM_CODEGEN_DWARFSTRINGPOOLENTRY_H

#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/StringMap.h"

namespace llvm {

class MCSymbol;

/// Data for a string pool entry.
struct DwarfStringPoolEntry {};

/// DwarfStringPoolEntry with string keeping externally.
struct DwarfStringPoolEntryWithExtString : public DwarfStringPoolEntry {};

/// DwarfStringPoolEntryRef: Dwarf string pool entry reference.
///
/// Dwarf string pool entry keeps string value and its data.
/// There are two variants how data are represented:
///
///   1. String data in pool  - StringMapEntry<DwarfStringPoolEntry>.
///   2. External string data - DwarfStringPoolEntryWithExtString.
///
/// The external data variant allows reducing memory usage for the case
/// when string pool entry does not have data: string entry does not
/// keep any data and so no need to waste space for the full
/// DwarfStringPoolEntry. It is recommended to use external variant if not all
/// entries of dwarf string pool have corresponding DwarfStringPoolEntry.

class DwarfStringPoolEntryRef {};

} // end namespace llvm

#endif