llvm/llvm/lib/Target/BPF/BTFDebug.h

//===- BTFDebug.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
//
//===----------------------------------------------------------------------===//
///
/// \file
/// This file contains support for writing BTF debug info.
///
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIB_TARGET_BPF_BTFDEBUG_H
#define LLVM_LIB_TARGET_BPF_BTFDEBUG_H

#include "llvm/ADT/StringMap.h"
#include "llvm/CodeGen/DebugHandlerBase.h"
#include "llvm/DebugInfo/BTF/BTF.h"
#include <cstdint>
#include <map>
#include <set>
#include <unordered_map>

namespace llvm {

class AsmPrinter;
class BTFDebug;
class DIType;
class GlobalVariable;
class MachineFunction;
class MachineInstr;
class MachineOperand;
class MCInst;
class MCStreamer;
class MCSymbol;

/// The base class for BTF type generation.
class BTFTypeBase {};

/// Handle several derived types include pointer, const,
/// volatile, typedef and restrict.
class BTFTypeDerived : public BTFTypeBase {};

/// Handle struct or union forward declaration.
class BTFTypeFwd : public BTFTypeBase {};

/// Handle int type.
class BTFTypeInt : public BTFTypeBase {};

/// Handle enumerate type.
class BTFTypeEnum : public BTFTypeBase {};

/// Handle array type.
class BTFTypeArray : public BTFTypeBase {};

/// Handle struct/union type.
class BTFTypeStruct : public BTFTypeBase {};

/// Handle function pointer.
class BTFTypeFuncProto : public BTFTypeBase {};

/// Handle subprogram
class BTFTypeFunc : public BTFTypeBase {};

/// Handle variable instances
class BTFKindVar : public BTFTypeBase {};

/// Handle data sections
class BTFKindDataSec : public BTFTypeBase {};

/// Handle binary floating point type.
class BTFTypeFloat : public BTFTypeBase {};

/// Handle decl tags.
class BTFTypeDeclTag : public BTFTypeBase {};

/// Handle 64-bit enumerate type.
class BTFTypeEnum64 : public BTFTypeBase {};

class BTFTypeTypeTag : public BTFTypeBase {};

/// String table.
class BTFStringTable {};

/// Represent one func and its type id.
struct BTFFuncInfo {};

/// Represent one line info.
struct BTFLineInfo {};

/// Represent one field relocation.
struct BTFFieldReloc {};

/// Collect and emit BTF information.
class BTFDebug : public DebugHandlerBase {};

} // end namespace llvm

#endif