Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/BPF/BTFDebug.h
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
/// Handle enumerate type. | /// Handle enumerate type. | ||||
class BTFTypeEnum : public BTFTypeBase { | class BTFTypeEnum : public BTFTypeBase { | ||||
const DICompositeType *ETy; | const DICompositeType *ETy; | ||||
std::vector<struct BTF::BTFEnum> EnumValues; | std::vector<struct BTF::BTFEnum> EnumValues; | ||||
public: | public: | ||||
BTFTypeEnum(const DICompositeType *ETy, uint32_t NumValues); | BTFTypeEnum(const DICompositeType *ETy, uint32_t NumValues, bool IsSigned); | ||||
uint32_t getSize() override { | uint32_t getSize() override { | ||||
return BTFTypeBase::getSize() + EnumValues.size() * BTF::BTFEnumSize; | return BTFTypeBase::getSize() + EnumValues.size() * BTF::BTFEnumSize; | ||||
} | } | ||||
void completeType(BTFDebug &BDebug) override; | void completeType(BTFDebug &BDebug) override; | ||||
void emitType(MCStreamer &OS) override; | void emitType(MCStreamer &OS) override; | ||||
}; | }; | ||||
/// Handle array type. | /// Handle array type. | ||||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | |||||
public: | public: | ||||
BTFTypeDeclTag(uint32_t BaseTypeId, int ComponentId, StringRef Tag); | BTFTypeDeclTag(uint32_t BaseTypeId, int ComponentId, StringRef Tag); | ||||
uint32_t getSize() override { return BTFTypeBase::getSize() + 4; } | uint32_t getSize() override { return BTFTypeBase::getSize() + 4; } | ||||
void completeType(BTFDebug &BDebug) override; | void completeType(BTFDebug &BDebug) override; | ||||
void emitType(MCStreamer &OS) override; | void emitType(MCStreamer &OS) override; | ||||
}; | }; | ||||
/// Handle 64-bit enumerate type. | |||||
class BTFTypeEnum64 : public BTFTypeBase { | |||||
const DICompositeType *ETy; | |||||
std::vector<struct BTF::BTFEnum64> EnumValues; | |||||
public: | |||||
BTFTypeEnum64(const DICompositeType *ETy, uint32_t NumValues, bool IsSigned); | |||||
uint32_t getSize() override { | |||||
return BTFTypeBase::getSize() + EnumValues.size() * BTF::BTFEnum64Size; | |||||
} | |||||
void completeType(BTFDebug &BDebug) override; | |||||
void emitType(MCStreamer &OS) override; | |||||
}; | |||||
class BTFTypeTypeTag : public BTFTypeBase { | class BTFTypeTypeTag : public BTFTypeBase { | ||||
const DIDerivedType *DTy; | const DIDerivedType *DTy; | ||||
StringRef Tag; | StringRef Tag; | ||||
public: | public: | ||||
BTFTypeTypeTag(uint32_t NextTypeId, StringRef Tag); | BTFTypeTypeTag(uint32_t NextTypeId, StringRef Tag); | ||||
BTFTypeTypeTag(const DIDerivedType *DTy, StringRef Tag); | BTFTypeTypeTag(const DIDerivedType *DTy, StringRef Tag); | ||||
void completeType(BTFDebug &BDebug) override; | void completeType(BTFDebug &BDebug) override; | ||||
▲ Show 20 Lines • Show All 185 Lines • Show Last 20 Lines |