48#ifndef LLVM_LIB_TARGET_BPF_BTF_H
49#define LLVM_LIB_TARGET_BPF_BTF_H
97#define HANDLE_BTF_KIND(ID, NAME) BTF_KIND_##NAME = ID,
306#define BTF_DEFINE_TAIL(Type, Accessor) \
307 const Type &Accessor() const { return *getTrailingObjects<Type>(); }
311#define BTF_DEFINE_TAIL_ARR(Type, Accessor) \
312 ArrayRef<Type> Accessor() const { \
313 return ArrayRef<Type>(getTrailingObjects<Type>(), getVlen()); \
322 return V->getKind() == BTF_KIND_ARRAY;
332 return V->getKind() == BTF_KIND_STRUCT || V->getKind() == BTF_KIND_UNION;
341 return V->getKind() == BTF_KIND_ENUM;
351 return V->getKind() == BTF_KIND_ENUM64;
355#undef BTF_DEFINE_TAIL
356#undef BTF_DEFINE_TAIL_ARR
#define BTF_DEFINE_TAIL(Type, Accessor)
#define BTF_DEFINE_TAIL_ARR(Type, Accessor)
Mark the given Function as meaning that it cannot be changed in any way mark any values that are used as this function s parameters or by its return values(according to Uses) live as well. void DeadArgumentEliminationPass
static std::array< T, N > getArray(const MachOObjectFile &O, const void *Ptr)
This header defines support for implementing classes that have some trailing object (or arrays of obj...
See the file comment for details on the usage of the TrailingObjects type.
@ MAX_VLEN
Max # of struct/union/enum members or func args.
@ VAR_GLOBAL_ALLOCATED
Linkage: ExternalLinkage.
@ VAR_STATIC
Linkage: InternalLinkage.
@ VAR_GLOBAL_EXTERNAL
Linkage: ExternalLinkage.
constexpr uint32_t ENUM_SIGNED_FLAG
constexpr uint32_t FWD_UNION_FLAG
PatchableRelocKind
CO-RE relocation kind codes used in .BTF.ext section.
This is an optimization pass for GlobalISel generic memory operations.
static bool classof(const CommonType *V)
Specifying one offset relocation.
uint32_t InsnOffset
Byte offset in this section.
uint32_t OffsetNameOff
The string to traverse types.
uint32_t RelocKind
What to patch the instruction.
uint32_t TypeID
TypeID for the relocation.
Specifying one function info.
uint32_t InsnOffset
Byte offset in the section.
uint32_t TypeId
Type id referring to .BTF type section.
Specifying one line info.
uint32_t LineCol
Line num: line_col >> 10, col num: line_col & 0x3ff.
uint32_t FileNameOff
File name index in the .BTF string table.
uint32_t InsnOffset
Byte offset in this section.
uint32_t LineOff
Line index in the .BTF string table.
BTF_KIND_ARRAY is followed by one "struct BTFArray".
uint32_t Nelems
Number of elements for this array.
uint32_t IndexType
Index type.
uint32_t ElemType
Element type.
BTF_KIND_DATASEC are followed by multiple "struct BTFDataSecVar".
uint32_t Size
Occupied memory size.
uint32_t Type
A BTF_KIND_VAR type.
uint32_t Offset
In-section offset.
BTF_KIND_ENUM64 is followed by multiple "struct BTFEnum64".
uint32_t NameOff
Enum name offset in the string table.
uint32_t Val_Hi32
Enum member hi32 value.
uint32_t Val_Lo32
Enum member lo32 value.
BTF_KIND_ENUM is followed by multiple "struct BTFEnum".
int32_t Val
Enum member value.
uint32_t NameOff
Enum name offset in the string table.
BTF_KIND_STRUCT and BTF_KIND_UNION are followed by multiple "struct BTFMember".
uint32_t NameOff
Member name offset in the string table.
uint32_t Offset
BitOffset or BitFieldSize+BitOffset.
uint32_t Type
Member type.
BTF_KIND_FUNC_PROTO are followed by multiple "struct BTFParam".
The BTF common type definition.
uint32_t NameOff
Type name offset in the string table.
uint32_t Info
"Info" bits arrangement: Bits 0-15: vlen (e.g.
static bool classof(const CommonType *V)
static bool classof(const CommonType *V)
Specifying offset relocation's in one section.
uint32_t NumFieldReloc
Number of offset reloc's in this section.
uint32_t SecNameOff
Section name index in the .BTF string table.
Specifying function info's in one section.
uint32_t SecNameOff
Section name index in the .BTF string table.
uint32_t NumFuncInfo
Number of func info's in this section.
Specifying line info's in one section.
uint32_t NumLineInfo
Number of line info's in this section.
uint32_t SecNameOff
Section name index in the .BTF string table.
static bool classof(const CommonType *V)