LLVM 20.0.0git
|
The base class for BTF type generation. More...
#include "Target/BPF/BTFDebug.h"
Public Member Functions | |
BTFTypeBase () | |
virtual | ~BTFTypeBase ()=default |
void | setId (uint32_t Id) |
uint32_t | getId () |
uint32_t | roundupToBytes (uint32_t NumBits) |
virtual uint32_t | getSize () |
Get the size of this BTF type entry. | |
virtual void | completeType (BTFDebug &BDebug) |
Complete BTF type generation after all related DebugInfo types have been visited so their BTF type id's are available for cross referece. | |
virtual void | emitType (MCStreamer &OS) |
Emit types for this BTF type entry. | |
Protected Attributes | |
uint8_t | Kind |
bool | IsCompleted |
uint32_t | Id |
struct BTF::CommonType | BTFType |
The base class for BTF type generation.
Definition at line 39 of file BTFDebug.h.
|
inline |
Definition at line 47 of file BTFDebug.h.
|
virtualdefault |
|
inlinevirtual |
Complete BTF type generation after all related DebugInfo types have been visited so their BTF type id's are available for cross referece.
Reimplemented in llvm::BTFTypeDerived, llvm::BTFTypeFwd, llvm::BTFTypeInt, llvm::BTFTypeEnum, llvm::BTFTypeArray, llvm::BTFTypeStruct, llvm::BTFTypeFuncProto, llvm::BTFTypeFunc, llvm::BTFKindVar, llvm::BTFKindDataSec, llvm::BTFTypeFloat, llvm::BTFTypeDeclTag, llvm::BTFTypeEnum64, and llvm::BTFTypeTypeTag.
Definition at line 57 of file BTFDebug.h.
|
virtual |
Emit types for this BTF type entry.
Emit a BTF common type.
Reimplemented in llvm::BTFTypeDerived, llvm::BTFTypeFwd, llvm::BTFTypeInt, llvm::BTFTypeEnum, llvm::BTFTypeArray, llvm::BTFTypeStruct, llvm::BTFTypeFuncProto, llvm::BTFTypeFunc, llvm::BTFKindVar, llvm::BTFKindDataSec, llvm::BTFTypeDeclTag, and llvm::BTFTypeEnum64.
Definition at line 48 of file BTFDebug.cpp.
References BTFKindStr, BTFType, Id, llvm::BTF::CommonType::Info, Kind, llvm::BTF::CommonType::NameOff, OS, llvm::BTF::CommonType::Size, and llvm::Twine::utohexstr().
Referenced by llvm::BTFTypeDerived::emitType(), llvm::BTFTypeFwd::emitType(), llvm::BTFTypeInt::emitType(), llvm::BTFTypeEnum::emitType(), llvm::BTFTypeArray::emitType(), llvm::BTFTypeStruct::emitType(), llvm::BTFTypeFuncProto::emitType(), llvm::BTFTypeFunc::emitType(), llvm::BTFKindVar::emitType(), llvm::BTFKindDataSec::emitType(), llvm::BTFTypeDeclTag::emitType(), and llvm::BTFTypeEnum64::emitType().
|
inline |
Definition at line 50 of file BTFDebug.h.
References Id.
|
inlinevirtual |
Get the size of this BTF type entry.
Reimplemented in llvm::BTFTypeInt, llvm::BTFTypeEnum, llvm::BTFTypeArray, llvm::BTFTypeStruct, llvm::BTFTypeFuncProto, llvm::BTFTypeFunc, llvm::BTFKindVar, llvm::BTFKindDataSec, llvm::BTFTypeDeclTag, and llvm::BTFTypeEnum64.
Definition at line 53 of file BTFDebug.h.
References llvm::BTF::CommonTypeSize.
Referenced by llvm::BTFTypeInt::getSize(), llvm::BTFTypeEnum::getSize(), llvm::BTFTypeArray::getSize(), llvm::BTFTypeStruct::getSize(), llvm::BTFTypeFuncProto::getSize(), llvm::BTFTypeFunc::getSize(), llvm::BTFKindVar::getSize(), llvm::BTFKindDataSec::getSize(), llvm::BTFTypeDeclTag::getSize(), and llvm::BTFTypeEnum64::getSize().
Definition at line 51 of file BTFDebug.h.
Referenced by llvm::BTFTypeEnum::BTFTypeEnum(), llvm::BTFTypeEnum64::BTFTypeEnum64(), llvm::BTFTypeFloat::BTFTypeFloat(), llvm::BTFTypeInt::BTFTypeInt(), and llvm::BTFTypeStruct::BTFTypeStruct().
|
inline |
Definition at line 49 of file BTFDebug.h.
References Id.
|
protected |
Definition at line 44 of file BTFDebug.h.
Referenced by llvm::BTFKindDataSec::BTFKindDataSec(), llvm::BTFKindVar::BTFKindVar(), llvm::BTFTypeArray::BTFTypeArray(), llvm::BTFTypeDeclTag::BTFTypeDeclTag(), llvm::BTFTypeDerived::BTFTypeDerived(), llvm::BTFTypeEnum::BTFTypeEnum(), llvm::BTFTypeEnum64::BTFTypeEnum64(), llvm::BTFTypeFloat::BTFTypeFloat(), llvm::BTFTypeFunc::BTFTypeFunc(), llvm::BTFTypeFuncProto::BTFTypeFuncProto(), llvm::BTFTypeFwd::BTFTypeFwd(), llvm::BTFTypeInt::BTFTypeInt(), llvm::BTFTypeStruct::BTFTypeStruct(), llvm::BTFTypeTypeTag::BTFTypeTypeTag(), llvm::BTFTypeDerived::completeType(), llvm::BTFTypeFwd::completeType(), llvm::BTFTypeInt::completeType(), llvm::BTFTypeEnum::completeType(), llvm::BTFTypeStruct::completeType(), llvm::BTFTypeFuncProto::completeType(), llvm::BTFTypeFunc::completeType(), llvm::BTFKindVar::completeType(), llvm::BTFKindDataSec::completeType(), llvm::BTFTypeFloat::completeType(), llvm::BTFTypeDeclTag::completeType(), llvm::BTFTypeEnum64::completeType(), llvm::BTFTypeTypeTag::completeType(), emitType(), and llvm::BTFTypeDerived::setPointeeType().
|
protected |
Definition at line 43 of file BTFDebug.h.
Referenced by llvm::BTFKindDataSec::addDataSecEntry(), emitType(), getId(), and setId().
|
protected |
Definition at line 42 of file BTFDebug.h.
Referenced by llvm::BTFTypeDerived::completeType(), llvm::BTFTypeFwd::completeType(), llvm::BTFTypeInt::completeType(), llvm::BTFTypeEnum::completeType(), llvm::BTFTypeArray::completeType(), llvm::BTFTypeStruct::completeType(), llvm::BTFTypeFuncProto::completeType(), llvm::BTFTypeFunc::completeType(), llvm::BTFTypeFloat::completeType(), llvm::BTFTypeDeclTag::completeType(), llvm::BTFTypeEnum64::completeType(), and llvm::BTFTypeTypeTag::completeType().
|
protected |
Definition at line 41 of file BTFDebug.h.
Referenced by llvm::BTFKindDataSec::BTFKindDataSec(), llvm::BTFKindVar::BTFKindVar(), llvm::BTFTypeArray::BTFTypeArray(), llvm::BTFTypeDeclTag::BTFTypeDeclTag(), llvm::BTFTypeDerived::BTFTypeDerived(), llvm::BTFTypeEnum::BTFTypeEnum(), llvm::BTFTypeEnum64::BTFTypeEnum64(), llvm::BTFTypeFloat::BTFTypeFloat(), llvm::BTFTypeFunc::BTFTypeFunc(), llvm::BTFTypeFuncProto::BTFTypeFuncProto(), llvm::BTFTypeFwd::BTFTypeFwd(), llvm::BTFTypeInt::BTFTypeInt(), llvm::BTFTypeStruct::BTFTypeStruct(), llvm::BTFTypeTypeTag::BTFTypeTypeTag(), llvm::BTFTypeDerived::completeType(), and emitType().