#include "llvm/DebugInfo/BTF/BTFContext.h"
#include "llvm/ObjectYAML/YAML.h"
#include "llvm/ObjectYAML/yaml2obj.h"
#include "llvm/Support/SwapByteOrder.h"
#include "llvm/Testing/Support/Error.h"
usingnamespacellvm;
usingnamespacellvm::object;
#define LC(Line, Col) …
#define ASSERT_SUCCEEDED(E) …
const char BTFEndOfData[] = …;
const char BTFExtEndOfData[] = …;
static raw_ostream &operator<<(raw_ostream &OS, const yaml::BinaryRef &Ref) { … }
template <typename T>
static yaml::BinaryRef makeBinRef(const T *Ptr, size_t Size = sizeof(T)) { … }
namespace {
struct MockData1 { … };
TEST(BTFParserTest, simpleCorrectInput) { … }
TEST(BTFParserTest, badSectionNameOffset) { … }
#define EXPECT_PARSE_ERROR(Mock, Message) …
TEST(BTFParserTest, badBTFMagic) { … }
TEST(BTFParserTest, badBTFVersion) { … }
TEST(BTFParserTest, badBTFHdrLen) { … }
TEST(BTFParserTest, badBTFSectionLen) { … }
TEST(BTFParserTest, badBTFExtMagic) { … }
TEST(BTFParserTest, badBTFExtVersion) { … }
TEST(BTFParserTest, badBTFExtHdrLen) { … }
TEST(BTFParserTest, badBTFExtSectionLen) { … }
TEST(BTFParserTest, badBTFExtLineInfoRecSize) { … }
TEST(BTFParserTest, badBTFExtLineSectionName) { … }
TEST(BTFParserTest, missingSections) { … }
TEST(BTFParserTest, parserReset) { … }
TEST(BTFParserTest, btfContext) { … }
static uint32_t mkInfo(uint32_t Kind) { … }
template <typename T> static void append(std::string &S, const T &What) { … }
class MockData2 { … };
TEST(BTFParserTest, allTypeKinds) { … }
TEST(BTFParserTest, bigStruct) { … }
TEST(BTFParserTest, incompleteTypes) { … }
#define SYMBOLIZE(SecAddr, Expected) …
SA;
TEST(BTFParserTest, typeRelocs) { … }
TEST(BTFParserTest, enumRelocs) { … }
TEST(BTFParserTest, enumRelocsMods) { … }
TEST(BTFParserTest, fieldRelocs) { … }
TEST(BTFParserTest, fieldRelocsMods) { … }
TEST(BTFParserTest, relocTypeTagAndVoid) { … }
TEST(BTFParserTest, longRelocModifiersCycle) { … }
TEST(BTFParserTest, relocAnonFieldsAndTypes) { … }
TEST(BTFParserTest, miscBadRelos) { … }
TEST(BTFParserTest, relocsMultipleSections) { … }
TEST(BTFParserTest, parserResetReloAndTypes) { … }
TEST(BTFParserTest, selectiveLoad) { … }
}